Energy density is the amount of energy stored in a given system or region of space per unit volume or mass, though the latter is more accurately termed specific energy. Often only the useful or extractable energy is measured, which means that chemically inaccessible energy such as rest mass energy is ignored.
Energy density is the amount of electrical energy stored per cubic meter of the battery volume. It usually has units of Wh.m−3. It is also an important parameter as the battery’s energy capacity (Wh) can be divided by the battery’s energy density (Wh.m−3) to show the volume of battery required.
Alternatively, suppose a known volume is available for batteries. In that case, the volume (m3) can be multiplied by the battery’s energy density (Wh.m−3) to approximate how much electrical energy can be made available. The battery volume may well have a considerable impact on vehicle design. As with specific energy, the energy density is a nominal figure.
In cosmological and other general relativistic contexts, however, the energy densities considered correspond to the elements of the stress-energy tensor. Therefore, they include mass energy and energy densities associated with the pressures described in the next paragraph. Energy per unit volume has the same physical units as pressure and, in many circumstances, is a synonym. For example, the energy density of a magnetic field may be expressed as (and behaves as) a physical pressure, and the energy required to compress a compressed gas a little more may be determined by multiplying the difference between the gas pressure and the external pressure by the change in volume. In short, pressure is a measure of a system’s enthalpy per unit volume. A pressure gradient has the potential to perform work on the surroundings by converting enthalpy until equilibrium is reached.
It is adapted from the introduction of Electric Vehicle Technology Explained by James Larminie and English DBPedia.