The formula for the $i$-th component of the total magnetic force ( $F_i$ ) on a volume $V$ is expressed as a surface integral over its boundary $S$ :
$$ F_i=\frac{1}{\mu_0} \oint_S\left[B_j B_i-\frac{1}{2} \delta_{i j} B^2\right] d S_j $$
This conversion is achieved by applying the Divergence Theorem to the divergence of the magnetic Maxwell Stress Tensor. It shows that the force component $F_i$ is determined entirely by the magnetic field components ( $B_i, B_j$ ) and the surface element ( $d S_j$ ) measured only at the boundary surface.
<aside> ❓