It's time for a worked example!
e.g. An electric motor is used to lift a 0.6 kg mass through a height of 1 m. The energy it uses is measured on an energy meter: 10 J.
The useful work done lifting it is found from the gravitational potential energy formula:
So the efficiency can now be found:
This is a quite efficient motor, yet electric motors used in modern electric/hybrid cars are nearly 100% efficient (the Honda Civic Hybrid's motor is 97.5% efficient!)