Loop Potential Energy Calculator – U = −μB cos θ, Torque & Flip Work

Use this free Loop Potential Energy Calculator to find the potential energy of a magnetic moment in a field, U = −μ × B × cos θ, together with the torque at that angle and the work needed to flip the loop through 180°.

μ B flip 180° lowest energy: μ aligned with B (θ = 0°)

Formula

U = −μ × B × cos θ, τ = μ × B × sin θ, and the energy change on flipping 180° is ΔU = 2 × μ × B × cos θ  •  U in joules (J), τ in newton-metres (N·m). The energy is lowest (−μB) when the moment points along the field and highest (+μB) when it points against it — a total swing of 2μB, which is exactly the work an MRI must account for when it flips proton spins.

How to use

Worked example

A loop with moment μ = 2 A·m² sits in a field of B = 0.5 T at θ = 60°.
U = −μB cos θ = −2 × 0.5 × cos 60° = −2 × 0.5 × 0.5 = −0.5 J.
τ = μB sin θ = 2 × 0.5 × sin 60° = 0.866 N·m, pulling the loop toward alignment.
Flipping it 180° from here changes the energy by ΔU = 2μB cos θ = +1 J — you must do 1 joule of work against the field to turn it end-for-end.

FAQ

Why is the potential energy negative when the loop is aligned?
U is defined as zero at θ = 90° and measured relative to that. Alignment is the configuration the field "wants", so it sits below zero — the field would do positive work (releasing μB) to rotate the loop there from 90°.

What if ΔU for the flip comes out negative?
That happens when θ > 90°: the loop is already past halfway, so flipping it the rest of the way releases energy instead of costing it — left alone, the torque would snap it around on its own.

How does this explain MRI?
Protons are tiny magnetic moments. In the scanner's field they settle into the low-energy aligned state, and a radio pulse supplies exactly the flip energy (2μB per spin, delivered as photons) to knock them into the high-energy state; the signal comes from them falling back.