The last part of the above definition is frequently omitted by students.
For example, imagine you are lifting a laptop (aka notebook) from your bag on the floor to the desk you are working at. The laptop has a mass of 2.1 kg and is lifted through a height of 92 cm. How much work was done against gravity?
First convert the height into SI units:
Next calculate the weight of the laptop, which is equal to the force required to lift it through the height:
Finally calculate the work done on the laptop:
Incidentally the work done against gravity lifting the laptop that height is equal to the change in gravitational potential energy in moving from the floor to the desk.
Thus the reason for the equation – in simple terms. The fuller derivation requires an integration.