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

Frequently Asked Questions

What is a kilowatt-hour?

A kWh is the energy consumed by a 1000 W appliance running for 1 hour. It is the standard unit on electricity bills.

How much does 1 kWh cost?

Varies by location and provider. In the US, the average is roughly $0.12 to $0.30 per kWh.

How do I calculate my electricity bill?

Sum the kWh used by each appliance (power * hours / 1000), then multiply total kWh by your rate per kWh.

Ready to run the numbers?

Open Electrical Energy Calculator