If you are designing inductors, transformers, or magnetic actuators, the magnetic field energy density formula is the single most important equation on your workbench. The direct answer for the energy density (u) stored in a magnetic field is u = B2 / (2μ), which yields Joules per cubic meter (J/m3).

While textbooks often gloss over this equation in abstract electromagnetic theory, on the bench, misunderstanding this formula is the exact reason your DIY boost converter MOSFETs keep exploding or your solenoid actuators are underperforming. This guide breaks down the derivation, tracks the units through actual solved problems, and examines a real-world failure to show you how to apply this math correctly.

The Core Equation and Symbol Definitions

The formula calculates how much potential energy is packed into a specific volume of space permeated by a magnetic field. Before we run numbers, we must define the variables and the strict assumptions under which this formula holds true.

Symbol Parameter Standard SI Unit Practical Bench Notes
u Energy Density Joules per cubic meter (J/m3) Total energy is U = u × Volume.
B Magnetic Flux Density Tesla (T) Often measured in Gauss (G) on cheap bench meters; 1 T = 10,000 G.
μ Absolute Permeability Henries per meter (H/m) Product of vacuum permeability (μ0) and relative permeability (μr).
μ0 Vacuum Permeability ~1.2566 × 10-6 H/m Historically exactly 4π × 10-7, slightly adjusted in the 2019 SI redefinition by NIST, but 4π × 10-7 remains standard for engineering.
μr Relative Permeability Dimensionless Air = 1. Ferrite = 1,000 to 10,000. Varies with temperature and saturation.

When this formula applies (and its assumptions): This equation assumes a linear, isotropic material. It assumes the B-H curve is a straight line, meaning permeability (μ) is constant regardless of the applied field. In reality, ferromagnetic materials saturate. Once a core hits its saturation flux density (Bsat), μr plummets toward 1, and this linear formula breaks down unless you integrate the actual B-H curve area.

Rearranged Forms for Bench Calculations

On the bench, you rarely solve for u directly. Usually, you know your core material's saturation limit and your physical volume, and you need to find your maximum B field or required permeability. Here are the rearranged forms:

  • Solving for Flux Density (B): B = √(2μu) — Use this to find the maximum Tesla rating your core can handle before exceeding a specific energy density limit.
  • Solving for Permeability (μ): μ = B2 / (2u) — Use this to select a core material when you know your target flux density and required energy storage.
  • Solving for Total Volume (V): V = Utotal / u — Critical for sizing inductors in power supplies to ensure they don't physically overheat.

Unit Traps That Will Break Your Math

If your final answer is off by a factor of a million, you fell into one of these three traps:

Trap 1: Gauss vs. Tesla. Your Hall-effect gaussmeter reads 2,500 G. If you plug 2,500 into the B variable, your energy density will be off by a factor of 108. Always divide Gauss by 10,000 to get Tesla.

Trap 2: The Volume Scaling Error. Energy density is J/m3. If you measure your toroid core dimensions in centimeters and calculate a volume of 5 cm3, you must convert to cubic meters (5 × 10-6 m3) before multiplying by u to find total energy.

Trap 3: Forgetting μ0. Datasheets list μr (e.g., 2000 for a Fair-Rite 43 material). If you use 2000 as μ in the denominator instead of calculating μ = μ0 × μr, your result will be wildly incorrect.

Worked Problem 1: Air-Core Solenoid Energy

Let us calculate the energy density of a large air-core solenoid used in a DIY magnetic forming setup. The coil generates a uniform magnetic field of 0.8 Tesla in the center.

  1. Identify Knowns: B = 0.8 T. Since it is an air core, μr = 1, meaning μ = μ0 = 4π × 10-7 H/m (approx. 1.2566 × 10-6 H/m).
  2. Set up Equation: u = B2 / (2μ0)
  3. Substitute Values: u = (0.8)2 / (2 × 1.2566 × 10-6)
  4. Calculate Numerator: 0.82 = 0.64 T2
  5. Calculate Denominator: 2 × 1.2566 × 10-6 = 2.5132 × 10-6 H/m
  6. Divide: 0.64 / (2.5132 × 10-6) = 254,651 J/m3
  7. Unit Tracking Check: T2 / (H/m). Since 1 Tesla = 1 kg/(A·s2) and 1 Henry = 1 kg·m2/(A2·s2), the units resolve to (kg2/(A2·s4)) / (kg·m/(A2·s2)) = kg/(m·s2), which is exactly Joules per cubic meter (J/m3).

Worked Problem 2: The Ferrite vs. Air Gap Reality

This is where power electronics designers learn a counter-intuitive truth. Assume a gapped ferrite inductor where the flux density B is a uniform 0.25 T throughout both the ferrite core (μr = 2500) and the physical air gap.

  1. Ferrite Energy Density: uferrite = (0.25)2 / (2 × 4π × 10-7 × 2500) = 0.0625 / 0.0157 = 3.98 J/m3
  2. Air Gap Energy Density: uair = (0.25)2 / (2 × 4π × 10-7 × 1) = 0.0625 / (2.513 × 10-6) = 24,867 J/m3
The Insight: For the exact same flux density, the air gap stores roughly 6,250 times more energy per cubic meter than the ferrite. This is why high-current inductors require air gaps; the ferrite merely guides the flux, while the gap actually stores the energy.

Real-World Scenario: The Melted Boost Converter Inductor

Theory is clean; the workbench is unforgiving. Here is a scenario that illustrates what happens when the assumptions of the magnetic field energy density formula are ignored.

The Setup: A hobbyist is building a 12V-to-48V boost converter capable of 300W output. They need an inductor to store energy during the MOSFET's on-time. They select a solid MnZn ferrite toroid (e.g., TDK PC40 material, μr ≈ 2300) with a volume of 4.5 cm3. They calculate that they need to store 500 μJ (microjoules) per switching cycle.

The Numbers: Looking at the total volume (4.5 × 10-6 m3), they calculate the required energy density: u = 500 × 10-6 J / 4.5 × 10-6 m3 = 111 J/m3. Using the rearranged formula B = √(2μu), they plug in the ferrite's permeability: B = √(2 × 2300 × 1.256×10-6 × 111) = 0.80 Tesla.

The Outcome: They wind the coil, apply power, and the IRFB4110 MOSFET instantly shorts out in a puff of magic smoke. The inductor core is too hot to touch.

What Went Wrong: The builder ignored the physical limits of the material. PC40 ferrite saturates at roughly 0.39 T at 25°C (and drops to ~0.30 T at 100°C). The math demanded 0.80 T, which is physically impossible for solid ferrite. Because there was no air gap to lower the effective permeability and store the energy, the core saturated almost immediately. Once saturated, μr dropped to ~1, inductance collapsed to near zero, current spiked uncontrollably (di/dt went vertical), and the switch died. To fix this, they needed to introduce a physical air gap to drop the effective μ and force the energy into the gap, keeping B below 0.3 T.

Realistic Magnitudes: What Should Your Answer Look Like?

When you punch numbers into the magnetic field energy density formula, it helps to know if your answer is in the right ballpark. Use this reference table to sanity-check your calculations against real-world physical environments and components.

Environment / Component Typical B Field Calculated Energy Density (u) Context
Earth's Magnetic Field ~50 μT (0.00005 T) ~0.001 J/m3 Negligible for circuit design, critical for compass sensors.
Ferrite Core (Operating) 0.25 T ~4 to 10 J/m3 Low density due to high μr; core is just a flux guide.
Inductor Air Gap 0.25 T ~24,800 J/m3 Where the actual energy lives in a gapped power inductor.
MRI Scanner Bore (1.5T) 1.5 T ~895,000 J/m3 Massive energy; requires liquid helium cooling and heavy structural support to contain magnetic pressure.
Neodymium Magnet Surface ~1.2 T ~572,000 J/m3 High permanent field density; explains the severe pinch hazard of large N52 blocks.

For deeper reading on inductor design and magnetic storage limits, the Georgia State University HyperPhysics database provides excellent interactive derivations, while practical power magnetics design guides from manufacturers like Magnetics Inc. detail the exact B-H curve non-linearities that the basic formula glosses over. Always verify your theoretical energy density against the manufacturer's saturation curves before soldering your first prototype.