Electrical Energy Calculator Formula

Understand the math behind the electrical energy calculator. Each variable explained with a worked example.

Formulas Used

Energy (kWh)

energy_kwh = power_watts * time_hours / 1000

Energy (Joules)

energy_joules = power_watts * time_hours * 3600

Variables

VariableDescriptionDefault
power_wattsPower(W)100
time_hoursTime(hours)5

How It Works

Electrical Energy

Electrical energy is power consumed over a period of time.

Formula

E = P * t

In practical units: kWh = W * hours / 1000. In SI units: Joules = Watts * seconds.

Worked Example

A 100 W light bulb running for 5 hours.

power_watts = 100time_hours = 5
  1. 01E = P * t
  2. 02E = 100 * 5 = 500 Wh
  3. 03E = 0.5 kWh
  4. 04E = 100 * 5 * 3600 = 1,800,000 J

Ready to run the numbers?

Open Electrical Energy Calculator