Heat, work and energy transfer
Energy transfers have formulas: Q = mcΔT for heating, W = Fd for pushing, and useful output over input for efficiency.
A worked example
Heating 400 g of water by 25 degrees Celsius needs 400 x 4.19 x 25 = 41 900 J, and a machine given 500 J that delivers 350 J useful is 350 / 500 x 100 = 70% efficient.
The mistake people actually make
In Q = mcΔT the ΔT is the temperature change, not the final temperature. Work is only done when the object moves in the direction of the force, so holding a heavy box still does no work.