You must be doing a blowback gun.

Springs are ideally linear, F=1/2(spring const*displacement), near solid height is a variation.

I don't have the data but there are spring calculators, that take more into account so you enter coil count, wire diameter, material

So you can use the equation to solve for the spring constant,

K = 2*force/(displacement)

so you could load it with a force, or weight, measure displacement and get the spring constant--be careful with your units.

All good in theory, but I would use it only as a reference.