# How to determine the force of a solenoid based on inductance

I'm looking to potentially build my own small solenoids, I thought perhaps that I could take an Air core inductor, a spring, piece of plastic, and conductive core and build my own. Is there a way to determine force based on inductance and current (or power).

Force calculation:

$F=(N*I)^2\mu_0\dfrac{A}{(2g^2)}$

Where:

$\mu_0=4\pi*10^{-7}$
$F$ is the force in Newtons
$N$ is the number of turns
$I$ is the current in Amps
$A$ is the area in length units squared
$g$ is the length of the gap between the solenoid and a piece of metal

From this calculator

Inductance calculation:

$L=\dfrac{d^2*n^2}{18d+40l}$

Where:

$L$ is inductance in micro Henrys
$d$ is coil diameter in inches
$l$ is coil length in inches
$n$ is number of turns.

From this calculator

Magnetic force F = $\Large -\frac{1}{2}i^2\frac{dL}{dx}$

Where i is current, L is inductance and x is plunger displacement