To find a general equilibrium point for a spring based on the hook law, it is possible to start from the following premise:
Hook's law is given by:

Where,
k= Spring Constant
Change in Length
F = Force
When there is a Mass we have two force acting at the System:
W= mg
Where W is the force product of the weigth. Then the force net can be defined as,

But we have a system in equilibrium, so

We find the equilibrium for any location when
