Converts an energy quantity between J, kJ, kWh, cal, kcal, BTU, and Wh using exact NIST SP 811 joule-equivalents.
Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.
Try it
Inputs
value (number, from_unit, required) : The energy to convert
from_unit (string, required) one of: J, kJ, kWh, cal, kcal, BTU, Wh : Unit of the input value
to_unit (string, required) one of: J, kJ, kWh, cal, kcal, BTU, Wh : Unit to convert into
Outputs
result (to_unit): The converted energy
Steps
Look up the exact joule-equivalent of from_unit and of to_unit.
Convert the input to joules: joules = value * j_per(from_unit).
Convert joules to the target unit: result = joules / j_per(to_unit).
Round result to 6 significant figures.
Constants
J = 1 J (source: Guide for the Use of the International System of Units (SI))
kJ = 1000 J (source: Guide for the Use of the International System of Units (SI))
kWh = 3600000 J (source: Guide for the Use of the International System of Units (SI))
cal = 4.184 J (source: Guide for the Use of the International System of Units (SI))
kcal = 4184 J (source: Guide for the Use of the International System of Units (SI))
BTU = 1055.05585262 J (source: Guide for the Use of the International System of Units (SI))
Wh = 3600 J (source: Guide for the Use of the International System of Units (SI))
Sources
Guide for the Use of the International System of Units (SI) (National Institute of Standards and Technology, 2026-09-30T19:29:48Z) - kWh and Wh are exact from the SI watt and hour (3600 s); cal is the exact thermochemical calorie (4.184 J); BTU is the exact International Table (IT) British thermal unit, 1055.05585262 J.