Spring Force Calculator Formula

Understand the math behind the spring force calculator. Each variable explained with a worked example.

Formulas Used

Spring Force

force = spring_k * displacement

Stored Elastic Energy

energy = 0.5 * spring_k * pow(displacement, 2) / 1000

Variables

VariableDescriptionDefault
spring_kSpring Constant (k)(N/mm)5
displacementDisplacement (x)(mm)20

How It Works

Hooke's Law for Springs

A spring produces a restoring force proportional to its displacement from equilibrium.

Formulas

F = k x (Hooke's law)

U = 0.5 k x^2 (elastic potential energy)

where k is the spring constant, x is the displacement, F is the resulting force, and U is the stored energy. This holds as long as the spring remains in its linear elastic range.

Worked Example

A spring with k = 5 N/mm compressed by 20 mm.

spring_k = 5displacement = 20
  1. 01F = 5 x 20 = 100 N
  2. 02U = 0.5 x 5 x 20^2 = 0.5 x 5 x 400 = 1000 N-mm = 1.0 J

Frequently Asked Questions

When does Hooke's law stop being valid?

Hooke's law is valid only in the linear elastic range. When a spring is compressed beyond its solid length or stretched past its elastic limit, the force-displacement relationship becomes nonlinear and the spring may take a permanent set.

What is the difference between compression and extension springs?

Compression springs resist pushing forces and get shorter. Extension springs resist pulling forces and get longer. Both follow F = kx in the elastic range, but extension springs have an initial tension that must be overcome before they start to extend.

How do I calculate spring energy in practical units?

Energy in joules = F x / 2 = k x^2 / 2, where force is in newtons and displacement in metres. If k is in N/mm and x in mm, divide the result by 1000 to get joules.

Learn More

Guide

Understanding Vibration Analysis: Natural Frequency, Damping, and Resonance

Learn the fundamentals of mechanical vibration analysis. Covers natural frequency, damping ratio, resonance, forced vibration, vibration isolation, and practical measurement techniques.

Ready to run the numbers?

Open Spring Force Calculator