Force: Fx = -K(x-x0)
where, x0 is Spring Equilibrium Position, Fx is Force, k is Spring Force Constant, x is Distance from Equilibrium.
For example, Spring Force Constant(k) = 1 N/m, Distance from Equilibrium(x) = 0.2m, Spring Equilibrium Position(x0) = 0.1m, Then force = -1(0.2-0.1) = -0.2N.