Magnetic pressure is an energy density associated with the magnetic field. It is identical to any other physical pressure except that it is carried by the magnetic field rather than (in the case of gas) kinetic energy of the gas molecules. Interplay between magnetic pressure and ordinary gas pressure is important to both the fields of magnetohydrodynamics and plasma physics. Any magnetic field has an associated pressure that is contained by the boundary conditions on the field, and a gradient in field strength causes a force due to the magnetic pressure gradient; this force is called the magnetic pressure force.
The magnetic pressure force is most readily observed in an unsupported loop of wire: if an electric current passes through the loop, then the wire serves as an electromagnet, so that the magnetic field strength inside the loop is much greater than the field strength just outside the loop. The gradient in field strength gives rise to a magnetic pressure force that tends to stretch the wire uniformly outward. If enough current travels through the wire, then the loop of wire will form a circle. At even higher currents, the magnetic pressure can create tensile stress that exceeds the tensile strength of the wire itself, causing it to fracture or even explosively fragment. Management of magnetic pressure is a significant challenge in the design of ultrastrong electromagnets. Magnetic pressure can be used to propel projectiles; this is the operating principle of a rail gun.
If any currents present are parallel to the field, the magnetic field lines follow shapes in which the magnetic pressure gradient is exactly balanced by the magnetic tension force. Such a field configuration is called force-free, because there is no Lorentz force (). The familiar potential magnetic field is a special case of a force-free field: potential field configurations occupy space that contains no electric current at all.
The magnetic pressure PB is given in SI units (P in Pa, B in T, μ0 in H/m) by
and in cgs units (P in dyn/cm², B in G) by
.