Putting gases and batteries on one scale
Battery makers state volumetric energy density in watt hours per liter, while gas and fuel data come in megajoules per cubic meter. To compare a cell, a hydrogen tank and a natural gas supply, you need one unit. This page converts the gas-style figure to Wh/L. It is useful for students, product designers and analysts who sketch the size of an energy store for a vehicle, a backup power system or a portable device. The conversion is exact, so any difference you find between two options comes from the fuels and not from the arithmetic. Product pages for home batteries list capacity in kWh and size in liters or cubic centimeters, and dividing one by the other gives the same Wh/L figure you would get here from a megajoule value.
Why the factor is 0.2778
A watt hour is 3,600 joules, so 1 MJ is 1,000,000 / 3,600 = 277.78 Wh. A cubic meter holds 1,000 liters, so energy per liter is energy per cubic meter divided by 1,000. Together, Wh/L = MJ/m³ × 277.78 / 1,000 = MJ/m³ × 0.27778. Equivalently, divide by 3.6. For example, 3.6 MJ/m³ equals exactly 1 Wh/L, and 36 MJ/m³ equals 10 Wh/L. The relation to the kilowatt-hour is the same: 3.6 MJ is one kWh, and one kWh per cubic meter is one Wh per liter. That equality is handy for gas bills, where the energy delivered in kWh for each cubic meter delivered is numerically the same as the Wh per liter figure, so a bill that shows 10.9 kWh for each cubic meter means 10.9 Wh/L.
Gas energy density next to a battery
The starting entry converts to 2.7778 Wh/L. For comparison, a cubic meter of hydrogen gas at normal conditions holds about 10.8 MJ, which is 3.0 Wh/L, a tiny figure next to a battery. Entering 2.7778 Wh/L with the units reversed returns 10 MJ/m³. The default value shows the magnitude of gas energy at ambient pressure: only a few watt hours per liter, which explains why gas must be compressed, liquefied or stored in large volumes before it competes with other storage. A 5 liter container of natural gas at ambient pressure holds only about 53 Wh, less than a small power tool pack, which is why bottled gas is compressed.
Natural gas at ambient pressure
Natural gas at about 38 MJ/m³ equals 10.56 Wh/L. A household gas meter that registers one cubic meter has delivered about 10.56 kWh, because one cubic meter is 1,000 liters and each liter carries about 10.56 Wh. That ratio is the same 10.56 appearing in two units. Compressed to 200 bar the gas would hold of the order of two hundred times as much per liter of tank, ignoring the real gas behavior, which is why compressed natural gas is a practical vehicle fuel despite the low ambient figure.
Liquid fuels and the gap
Gasoline contains roughly 34 MJ per liter, which is 34,000 MJ/m³ and about 9,444 Wh/L. Diesel is somewhat higher. These values are approximate and vary by blend. Against that, lithium-ion cells have a volumetric energy density in the range of several hundred Wh/L, and hydrogen compressed to 700 bar holds about 1,300 Wh per liter of gas, and less than 1,000 Wh/L once the tank walls and fittings are counted. The converter lets you place each number you find in a data sheet on the same axis and see the ratios clearly.
Reading a battery label
A battery pack of 60 Wh in a volume of 0.2 liters has a volumetric energy density of 300 Wh/L, which corresponds to 1,080 MJ/m³ if you run the conversion the other way. Entering 1,080 on this page returns 300. Manufacturers differ in whether they count the cell only or the full pack with housing and cooling, so a quoted density can differ by tens of percent between sources. Use the same boundary for each option when you compare. A power tool pack that lists 72 Wh and 0.25 liters gives 288 Wh/L, which is 1,036.8 MJ/m³, and a second pack of 90 Wh in 0.4 liters gives 225 Wh/L, so the first pack is denser even though it holds less total energy.
Energy per volume is not range
High energy per liter does not guarantee a long range or long runtime. Efficiency of the converter, the weight of the container, the usable fraction of the stored energy and the load profile all matter. A diesel generator and a battery bank can deliver the same energy to a load while taking very different amounts of space and weight. This page provides one input to such a comparison and it does not model efficiency, losses or storage hardware. Combine it with the specific energy converter if weight matters. Tank shape also costs space: a pressure vessel wastes volume on its walls and fittings, so the effective density of a stored gas is lower than the figure for the gas alone.
Gross and net heating values and reference conditions
Gas figures in MJ/m³ depend on whether the value is gross or net and on the temperature and pressure of the cubic meter. A change from 0 to 15 degrees Celsius alters the volume of a gas by about 5 percent, which shifts the energy per cubic meter by the same amount. When you compare gases with batteries, a small difference in the gas figure rarely changes the conclusion, because the gap between the two is a factor of hundreds. For a rough check, a 5 percent change in gas volume moves 10.56 Wh/L by only about 0.5 Wh/L. For detailed engineering work, use the reference conditions stated by the standard you follow.
Compression and storage tanks
The page converts the unit of volumetric energy and nothing else. It does not model compression, liquefaction or storage tanks, and it does not convert to energy per mass. Results are shown with engine precision and can be rounded to the three significant digits typical of fuel data. Treat any comparison across technologies as a rough guide that sets orders of magnitude and not final numbers, and rely on certified data for design decisions. The rounded output of 4 decimals shown in the examples can be shortened to two for presentation, since fuel and battery data carry far less precision than the arithmetic.