Electric energy consumption is calculated using the formula E=P×t, where P is the power in watts and t is the time in hours. The result is typically measured in kilowatt-hours (kWh).