Hooke’s Law is one of the most fundamental relationships in mechanics: the force a spring exerts is directly proportional to how far it has been stretched or compressed from its natural length. This calculator solves that relationship in all three directions — find the spring constant k, the applied force F, or the displacement x — and also calculates the elastic potential energy stored in the spring and the natural oscillation frequency for a given attached mass.
How it works
The governing equation is Hooke’s Law:
F = k · x
where:
- F is the restoring force (newtons, N) — the force the spring exerts back against the load
- k is the spring constant or stiffness (N/m) — a material-and-geometry property of the spring itself
- x is the displacement (metres, m) — how far the spring is stretched or compressed from its equilibrium (natural) length
The law holds in the elastic region: displacements small enough that the spring returns to its original length when the load is removed. Beyond the elastic limit, permanent deformation sets in and Hooke’s Law breaks down.
Rearrangements for all three unknowns:
| Find | Formula | Use when |
|---|---|---|
| Spring constant | k = F ÷ x | You know load and deflection; want stiffness |
| Force | F = k × x | You know stiffness and deflection; want load |
| Displacement | x = F ÷ k | You know stiffness and load; want deflection |
Elastic potential energy stored in a compressed or stretched spring:
E = ½ k x²
This is derived by integrating the Hooke’s Law force over the displacement range 0 → x. The result is in joules (J).
Natural frequency of a spring-mass system (simple harmonic motion, no damping):
f = (1 / 2π) √(k / m)
where m is the attached mass in kilograms. The period T = 1/f gives the time for one complete oscillation in seconds.
Worked example
A test engineer deflects a coil spring by 25 mm by hanging a 5 kg mass from it (F = 5 × 9.81 = 49.05 N). What is the spring constant?
- Convert displacement: 25 mm = 0.025 m
- Apply Hooke’s Law: k = F / x = 49.05 / 0.025 = 1,962 N/m
- Elastic PE stored: E = ½ × 1,962 × 0.025² = 0.613 J
- Natural frequency with that 5 kg mass: f = (1/2π) √(1962/5) ≈ 3.15 Hz
That means the spring-mass system completes about 3.15 full oscillations per second if released.
| Spring type | Typical k |
|---|---|
| Soft foam mattress | 1–10 N/m |
| Pen click spring | 200–800 N/m |
| Bicycle fork | 5,000–15,000 N/m |
| Car suspension coil | 15,000–35,000 N/m |
| Industrial press spring | 100,000–500,000+ N/m |
Formula note
The sign convention in full Hooke’s Law is F = −kx (the restoring force opposes displacement). This calculator works with magnitudes — enter positive values for extension or compression and the sign convention is implicit. A positive k always indicates a restoring spring; a negative k would indicate an unstable system and is not physically meaningful for a standard spring.
All inputs are converted internally to SI units (N, m) before calculation, then the result is displayed back in whichever unit you selected. This avoids rounding errors from intermediate unit conversions.