Spring calculation formula