Magnetic Field Energy Density Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Magnetic fields do more than simply exert forces on moving charges; they also store energy. When you wind a coil, energize an electromagnet, or confine plasma in a fusion device, energy is sequestered in the magnetic field itself. The amount of energy per unit volume is known as the magnetic energy density and in a vacuum is given by u=B22μ_0, where B is the magnetic field strength and μ_0 is the permeability of free space. This calculator allows you to manipulate that formula in multiple ways: enter the field to obtain the stored energy density, supply a desired energy density to find the required field strength, or include a volume to determine the total energy contained in a region of space.

Understanding magnetic energy density is important across physics and engineering. In electrical power systems, the energy stored in transformer cores and inductors is fundamental to their operation. In magnetic resonance imaging machines, massive superconducting coils maintain large fields whose energy content must be carefully managed for safety. In astrophysics, magnetic pressure influences the dynamics of plasma in stars, accretion disks, and the interstellar medium. Because the energy density scales with the square of the field, doubling B quadruples the stored energy, a relationship our interface makes evident.

The permeability of free space is a constant defined as μ_0=×107 N/A2. In materials other than vacuum, the energy density expression becomes u=B22μ where μ is the absolute permeability of the medium. Our calculator assumes vacuum conditions, but if you know the relative permeability μ_r of a material, you can simply divide μ_0 by that factor to adapt the result.

Below is a table illustrating how field strength translates into energy density for a few representative values. These numbers provide intuition for the enormous energy content hidden in seemingly modest magnetic fields.

Magnetic Field (T)Energy Density (J/m³)
0.010.00004
0.100.004
1.00.4
5.010
10.040

Despite the small numbers at low fields, the energy density becomes strikingly large in high-field environments. For example, a laboratory solenoid producing 10 T over a 0.01 m³ volume stores about 0.4 J of energy—roughly the work needed to lift a small apple. In contrast, the magnetosphere of Earth, spanning volumes on the order of 1015 m³ with field strengths of several tens of microteslas, contains an enormous reservoir of energy that influences space weather and auroral activity. Solar flares release even greater amounts when magnetic field lines reconnect, converting stored magnetic energy into heat and kinetic energy of charged particles.

When designing inductors and transformers, engineers must consider not only the inductance value but also the energy that will be stored during operation. The energy in an inductor is U=12LI2. Because the inductance L is related to the geometry and permeability of the core, the energy density expression bridges circuit theory and field theory. Our calculator steps from the macroscopic perspective of total energy U to the microscopic distribution u. Entering a volume converts density to total energy, making it easy to evaluate how much energy a magnetic confinement system, a superconducting magnet, or a simple lab coil holds.

The formula u=B22μ_0 derives from the work required to assemble a current configuration that produces a magnetic field. Starting from Maxwell's equations, one can show that the magnetic field contributes an energy term analogous to the electric field energy density u=12ε0E2. Together these terms give the total electromagnetic energy density u=12ε0E2+B22μ_0. In dynamic situations, such as electromagnetic waves, energy sloshes back and forth between electric and magnetic fields, propagating through space as a Poynting vector. In static scenarios, our formula suffices to quantify stored magnetic energy.

To use the calculator, fill in any two of the four fields and leave the others blank. If you know the magnetic field and volume, the script computes the energy density and total energy. If you specify density and volume, it gives the total energy and required field. The code checks for the correct number of inputs and alerts you if the configuration is ambiguous. All calculations occur locally in JavaScript, leveraging the constant μ_0 with full precision.

Magnetic energy density also sheds light on pressure exerted by magnetic fields. The quantity P=u can be interpreted as a magnetic pressure pushing outward from regions of strong field. This pressure counteracts plasma pressure in stellar interiors and fusion experiments, leading to equilibria described by magnetohydrodynamics. In the Sun's corona, for instance, magnetic pressure shapes loops and arches seen in extreme ultraviolet images. Our calculator enables quick estimation of this pressure by computing the energy density first.

Consider a practical example: Suppose you are designing a Helmholtz coil pair to generate a uniform 0.1 T field in a 0.005 m³ region. Entering B=0.1 and V=0.005 yields an energy density of 0.004 J/m³ and a total energy of 2×10−5 J. This is a minuscule amount, meaning the coil can be energized quickly without significant stored energy. Scale up to 2 T over 1 m³ and the stored energy rises to 1.6 kJ, enough to demand caution when discharging the field.

In fusion research, superconducting magnets generate fields exceeding 5 T to confine plasmas. A tokamak with a plasma volume of 100 m³ at 5 T contains about 1000 J of magnetic energy density times the volume, amounting to 100 kJ. Engineers design quench protection systems to safely dissipate such energy if superconductivity is lost. Understanding the energy density clarifies why magnet systems are both powerful and potentially hazardous.

The calculator also aids in educational settings. Students can experiment with values to see how rapidly energy grows with field strength, reinforcing the square-law relationship. Teachers might use it to illustrate why Earth's magnetic field, though weak, is energetically significant because of the vast volume it permeates, or to compare magnetic energy with kinetic or thermal energies in various contexts. Because the interface runs entirely in the browser, it requires no software installation and works offline, making it suitable for classroom demonstrations or quick sanity checks in the lab.

On the theoretical side, the energy density concept plays a role in the stress-energy tensor of electromagnetic fields, which appears in general relativity. In regions dominated by magnetic fields, the energy density contributes to the curvature of spacetime, albeit typically by negligible amounts except in extreme astrophysical environments like magnetars. Nonetheless, the same simple formula implemented here underpins deep connections between electromagnetism and gravity.

Whether you're calculating the energy stored in a household inductor, estimating the magnetic pressure in a solar prominence, or exploring the fundamentals of field theory, this tool provides a convenient starting point. By adjusting the input values, you can explore “what if” scenarios and develop intuition for how magnetic fields carry energy. The textual explanations and sample table supply context, enabling a richer understanding than a bare equation alone.

Related Calculators

Electric Field Energy Density Calculator

Determine the energy stored in an electric field or solve for field strength from energy density.

electric field energy density calculator capacitor energy electrostatics

EMF Exposure Calculator - Estimate Power Density and Field Strength

Compute electromagnetic field exposure from transmitter power, distance, and frequency using far-field formulas.

EMF exposure calculator power density electric field magnetic field

Inductor Energy Calculator - Magnetic Energy Storage

Compute the energy stored in an inductor from its inductance and current using E=1/2LI^2.

inductor energy calculator magnetic energy 1/2 L I^2