Convert grams to joules using typical energy values for fuels such as gasoline or for food fat and carbs, enter your own J/g, or use E = mc².

Energy released by burning or digesting the material. For E = mc², choose the rest-mass mode.

Typical higher heating values for fuels and Atwater factors for food; real values vary by grade and source.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Grams to joules (fuel or food energy)Converts a mass of fuel or food into the energy it releases when burned or digestedRequires the mass and a material, or a custom specific energy
Joules to grams (fuel or food energy)Converts an amount of energy into the mass of fuel or food that releases itRequires the energy and a material, or a custom specific energy
Rest-mass energy (E = mc²)Converts a mass into its total energy equivalentRequires the mass
Mass from E = mc²Converts an amount of energy into its equivalent massRequires the energy

Mass is entered in g, kg, mg or lb, and energy in J, kJ, MJ or kWh. Each result also lists kilojoules, kilowatt-hours and kilocalories, using 4,184 J per kilocalorie and 3,600,000 J per kWh [5]. The two E = mc² functions have an optional setting for the percentage of the mass that is converted, which is 100% when left blank.

Grams to Joules Formulas

E = m × e
EEnergy (J)
mMass (g)
eSpecific energy of the material (J/g)

Grams measure mass and joules measure energy, so there is no fixed number of joules in a gram. The answer depends on the material and on how the energy is released: 1 g of gasoline gives about 46,500 J when burned, 1 g of food fat about 37,000 J, and 1 g of any matter is equivalent to 89,875,517,873,681.8 J under E = mc².

Grams to joules (fuel or food energy)

The formula applies directly, with the specific energy taken from the selected material:

MaterialEnergy per gram
Gasoline46.5 kJ
Butane49.5 kJ [3]
Methane or natural gas55.5 kJ [2]
Hydrogen141.8 kJ [4]
Food fat37 kJ (9 kcal) [1]
Food carbohydrate or protein17 kJ (4 kcal) [1]

The fuel figures are higher heating values, which count the heat recovered when the water vapor in the exhaust condenses. The methane and butane values follow from heats of combustion of 890.7 and 2,877.5 kJ/mol [2] [3], and the hydrogen value agrees with a published 141.9 MJ/kg [4]. The food figures are the general Atwater factors [1]. As an example, 100 g of food fat is 100 × 37,000 = 3,700,000 J, or 3,700 kJ. The custom option takes a specific energy in J/g, kJ/kg, MJ/kg or kcal/g.

Joules to grams (fuel or food energy)

m = E ÷ e

One megajoule of heat from gasoline takes 1,000,000 ÷ 46,500 = 21.505 g of fuel.

Rest-mass energy (E = mc²)

E = m × c² × fraction

Here m is in kilograms and c is the speed of light, 299,792,458 m/s. One gram is 0.001 × 299,792,458² = 8.98755 × 10¹³ J, which is 24,965,421.6 kWh. This is the total energy equivalent of the mass, not energy that burning or eating it would release. The result also gives the figure in metric tons of TNT at 4.184 × 10⁹ J per ton, as a unit comparison only.

Mass from E = mc²

m = E ÷ (c² × fraction)

An energy of 9 × 10¹³ J corresponds to 9 × 10¹³ ÷ 299,792,458² = 0.0010014 kg, or 1.0014 g.

Limits of This Estimate

  • The preset values are typical. Gasoline is a blend with no single heating value, and natural gas is not pure methane. These estimates are based on the best available data and estimations.
  • A heating value is quoted on a higher (gross) or lower (net) basis, and the two differ, by about 15% for hydrogen [4]. A custom value has to be on the basis the task calls for.
  • The Atwater factors are averages for whole food groups, so the energy of a specific food can differ [1].
  • The E = mc² functions are theoretical. No ordinary process converts a whole gram of matter into energy.

Sources

  1. Food and Agriculture Organization of the United Nations, Food energy: methods of analysis and conversion factors, Chapter 3: general Atwater factors for fat, carbohydrate and protein
  2. NIST Chemistry WebBook, Methane: heat of combustion of methane
  3. NIST Chemistry WebBook, Butane: heat of combustion of butane
  4. National Research Council and National Academy of Engineering, The Hydrogen Economy, Appendix H: higher and lower heating value of hydrogen
  5. NIST Special Publication 811, Appendix B.8: thermochemical kilocalorie and kilowatt hour in joules