The efficiency of a generator is calculated by dividing the electrical power output in kW by the mechanical energy input in kW, with typical efficiencies around 90%. For generator sets, efficiency is determined by the electrical output divided by the fuel energy used by the prime mover, with small gasoline generators averaging 12% efficiency and diesel generators about 23%. Commercial coal-fired plants can achieve efficiencies of up to 40%. The specific efficiency can vary based on the power range and available performance data. Consulting manufacturers is recommended for precise calculations.