Hooke's Law Calculator
Enter any two of force, spring constant and displacement, and this calculator solves the third using Hooke's Law (F = -kx). You also get the elastic potential energy stored in the spring and, if you supply the attached mass, the natural oscillation frequency. Switch the solve mode to work backwards from whatever you know.
Formula
Worked example
A spring with k = 200 N/m is compressed 0.05 m: F = 200 * 0.05 = 10 N. Elastic potential energy: U = 0.5 * 200 * 0.05^2 = 0.25 J. Attach a 0.5 kg mass: f = (1/2pi) * sqrt(200/0.5) = (1/2pi) * 20 = 3.18 Hz, period T = 0.314 s.
What is Hooke's Law?
Hooke's Law states that the force required to extend or compress a spring by a distance x is directly proportional to that distance, as long as the spring is not stretched beyond its elastic limit. The relationship is written F = -kx, where k is the spring constant (also called the stiffness constant) measured in newtons per metre (N/m) in SI units. The negative sign reflects that the spring always exerts a restoring force opposing the displacement. For most practical calculations the magnitude is used: F = kx. The law was published by British physicist Robert Hooke in 1678 as an anagram, later revealed as "ut tensio, sic vis" - as the extension, so the force.
The three forms: force, spring constant, displacement
Because F = kx contains three variables, you can rearrange it to solve for any one of them given the other two. To find force: F = k * x. To find the spring constant: k = F / x. To find displacement: x = F / k. This calculator handles all three modes. Choose which variable you want on the Solve for selector, enter the two known values, and the answer appears instantly. The spring constant tells you how stiff a spring is. A spring with k = 2000 N/m requires 2000 N of force to compress or extend it by exactly 1 m. Higher k means stiffer.
Elastic potential energy and work done
When you compress or stretch a spring, you store elastic potential energy in it. The formula is U = 0.5 * k * x^2, where U is in joules (for SI inputs). This stored energy is released when the spring returns to its natural length. If you move a spring from displacement x1 to displacement x2, the work done is W = 0.5 * k * (x2^2 - x1^2). For example, a spring with k = 200 N/m compressed 0.05 m stores U = 0.5 * 200 * 0.05^2 = 0.25 J. The elastic potential energy grows quadratically with displacement, so doubling the compression quadruples the stored energy.
Natural frequency and the spring-mass system
A mass attached to a spring will oscillate back and forth after being displaced from equilibrium. The natural frequency of this oscillation is f = (1 / 2pi) * sqrt(k / m), where k is the spring constant and m is the mass in kilograms. The period (time for one complete oscillation) is T = 1 / f = 2pi * sqrt(m / k). This relationship appears throughout engineering: from the design of vehicle suspension systems to vibration isolation mounts and seismographs. Note that the natural frequency depends only on k and m, not on the amplitude of oscillation - this is one of the key properties of linear (Hookean) springs.
Elastic limit and when Hooke's Law breaks down
Hooke's Law is a linear approximation that holds only in the elastic region of a material. Beyond the elastic limit (sometimes called the proportionality limit), the spring or material deforms permanently and the force-displacement relationship becomes nonlinear. In metal coil springs, exceeding the elastic limit causes a phenomenon called spring set, where the free length decreases permanently. Real springs also show slightly nonlinear behavior near their coil-bind point (full compression) and near the point where coils begin to separate. Temperature affects stiffness too: most steel springs soften slightly at elevated temperatures, around 0.1 to 0.3 percent per degree Celsius. Always confirm that your calculated displacement stays within the manufacturer's rated deflection to ensure the spring remains in the elastic (linear) regime.
Typical spring constant ranges
| Application | Spring type | Typical k range (N/m) | Notes |
|---|---|---|---|
| Ballpoint pen | Compression | 3 - 15 | Very soft |
| Watch / clock | Hairspring | 0.01 - 1 | Ultra-soft |
| Mattress coil | Compression | 10,000 - 50,000 | Medium |
| Automotive suspension | Coil spring | 15,000 - 35,000 | Medium-stiff |
| Industrial valve return | Compression | 1,000 - 20,000 | Medium |
| Retaining ring / snap | Flat spring | 500 - 5,000 | Compact |
| Die-compression spring | Compression | 50,000 - 500,000 | Very stiff |
Approximate stiffness values for common spring types in SI units (N/m).
Frequently asked questions
What does the negative sign in F = -kx mean?
The negative sign indicates that the spring force acts in the opposite direction to the displacement. If you pull a spring to the right (positive x), the restoring force pulls it back to the left (negative F). In practice, most calculations use magnitudes: |F| = k * |x|, so the force and displacement numbers are always positive. The sign is important in differential equations describing oscillatory motion.
What units does the spring constant have?
In SI units the spring constant is measured in newtons per metre (N/m), which is the same as kg/s^2. In imperial engineering units it is commonly expressed in pounds-force per inch (lbf/in). To convert: 1 lbf/in = 175.127 N/m. Softer springs (k < 100 N/m) are typical of scales and small mechanisms; stiffer springs (k > 10,000 N/m) are common in automotive and industrial applications.
How do I find the spring constant of a spring I have at home?
Hang the spring vertically and attach a known weight to it, for example a 1 kg mass (weight = 9.81 N). Measure how far the spring stretches in metres. Divide the weight by the extension: k = F / x. Repeat with a few different weights and average the results for accuracy. Make sure you stay within the spring's elastic limit - if it does not return to its original length after removing the weight, you have exceeded the limit.
What is elastic potential energy?
Elastic potential energy is the energy stored in a deformed spring (or elastic material) due to its deformation. It equals U = 0.5 * k * x^2 in joules. This energy is fully recoverable as long as you stay within the elastic limit - release the spring and it converts the stored energy back into kinetic energy or does work. This principle is used in everything from archery bows to mechanical clocks to automotive valve springs.
Does the natural frequency change with amplitude?
For an ideal (linear) spring, no. The natural frequency f = (1/2pi) * sqrt(k/m) depends only on the spring constant and mass, not on how far you pull the mass before releasing it. This is a defining feature of simple harmonic motion. In real springs that begin to show nonlinear behavior at large displacements, frequency can shift slightly with amplitude, but for practical engineering applications within the rated deflection range this effect is usually negligible.
Can I use Hooke's Law for rubber bands or bungee cords?
Only approximately, and only over a limited range. Rubber and elastomers are viscoelastic: their force-displacement relationship is nonlinear, rate-dependent (they behave differently at different stretching speeds), and hysteretic (the loading and unloading curves differ). Hooke's Law may give a rough estimate over a small, slow displacement, but engineering-grade rubber components require more advanced material models (such as the Mooney-Rivlin model) for accurate design.
How do springs in series and parallel combine?
For springs in series (end to end), the effective spring constant is 1/k_eff = 1/k1 + 1/k2 + ..., which gives a softer combined spring. For springs in parallel (side by side, same displacement), k_eff = k1 + k2 + ..., which gives a stiffer combined spring. For example, two identical springs of k = 100 N/m in series give k_eff = 50 N/m, while the same two in parallel give k_eff = 200 N/m.