Before you commit to a spring design, you need to understand how force and displacement relate in your chosen setup. Miss the mark here and you'll either get a spring that's too weak, or one that fails early by overstressing. The calculator below runs the numbers for force, displacement, stiffness, or stored energy, based on inputs like spring rate (k), displacement (x), or force (F). These relationships show up anywhere you use springs — mechanical linkages, isolators, suspensions, valve closers. You'll find the formulas, a detailed example, and extra detail on where real springs stop behaving ideally — things like nonlinear rates, temperature drift, or permanent set.
What is Hooke's Law?
Hooke's Law is a linear rule: up to a point, the force from a spring is directly proportional to how far it moves from its initial length. Double the stretch or compression — double the force, at least until you reach the point where the material starts to permanently deform.
Simple Explanation
A spring behaves like a good bungee — pull it a certain amount, and you'll get a predictable reaction force, in the direction opposite to your pull or push. Multiply the spring's stiffness (k) by the amount of stretch or compression (x), and you'll have your force. Keep in mind, this only tracks until you push the material outside its intended range — then the prediction falls apart.
📐 Browse all 1000+ Interactive Calculators
Table of Contents
Visual Diagram
Hooke's Law Interactive Calculator
How to Use This Calculator
This calculator is intended for education, concept evaluation, and preliminary design. Results are based on the equations and assumptions described on this page, but cannot account for every real-world load case, tolerance, material property, environmental condition, installation detail, safety factor, code, or regulatory requirement. Verify all inputs, assumptions, units, and results independently before selecting components or using the result in a real application. Safety-critical, structural, medical, lifting, transportation, or regulated applications must be reviewed by a qualified engineer.
- Select what you’re solving for — force, displacement, stiffness, or stored energy.
- Enter your known numbers in the fields that show up, and stick to one set of units (N/m with meters, or N/mm with millimeters).
- If you’re looking for work or average force over a range, fill in both starting and ending displacements.
- Hit Calculate. The calculator shows the result for the variable you picked.
Hooke's Law Interactive Visualizer
Watch how force, displacement, and spring constant interact in real-time. Adjust any parameter to see the elastic behavior and energy storage visualized through spring compression and force vectors.
SPRING FORCE
10.0 N
STORED ENERGY
0.25 J
STRESS LEVEL
25%
FIRGELLI Automations — Interactive Engineering Calculators
Equations & Variables
Hooke's Law (Force-Displacement Relationship)
Use the formula below to calculate spring force.
F = Restoring force (N, newtons) — negative sign indicates force opposes displacement
k = Spring constant or stiffness (N/m or N/mm) — material and geometry dependent
x = Displacement from equilibrium position (m or mm) — positive for extension, negative for compression
Elastic Potential Energy
Use the formula below to calculate elastic potential energy.
U = Elastic potential energy stored in spring (J, joules)
Energy stored is always positive regardless of compression or extension direction
Work Done by/on Spring
Use the formula below to calculate work done moving a spring between two displacement positions.
W = Work done moving spring from position x₁ to x₂ (J)
x₁ = Initial displacement (m)
x₂ = Final displacement (m)
Positive work indicates energy input; negative work indicates energy release
Average Force Over Displacement Range
Use the formula below to calculate average force across a displacement range.
Favg = Average force during displacement from x₁ to x₂ (N)
Used for work calculations and actuator sizing when spring force varies linearly
Simple Example
Spring constant k = 200 N/m. Displacement x = 0.05 m (50 mm).
Spring force: F = k × x = 200 × 0.05 = 10 N
Energy stored: U = ½ × k × x² = 0.5 × 200 × 0.05² = 0.25 J
Theory & Practical Applications
Fundamental Physics of Linear Elasticity
Hooke's Law is simply the statement that a spring produces force opposite to displacement and, in the real world, only holds for as long as the material stays within its elastic range. For a coil spring, the rate (k) comes down to wire diameter (d), coil diameter (D), number of coils (n), and shear modulus (G): k = (G·d⁴)/(8·D³·n). This means if you make the wire twice as thick, the spring is 16 times stiffer; make the coil twice as large, it's one-eighth as stiff. It's not magic—just math and material properties.
The energy you can store in a spring comes straight from the force-displacement curve. Compress or stretch, and you're doing work against the force the spring pushes back with. The relationship is quadratic: U = ½kx². If you double your deflection, you get four times the energy, which quickly drives up stress. High energy density means a stiff spring or a large move—each approach has limits. Go for long compression and you risk buckling a spring if it’s too slender compared to its diameter (watch out if length is more than about four times diameter).
Deviations from Ideal Linear Behavior
In practice, most coil springs only behave linearly if you stay under about 80% of their maximum allowed stress. Go higher, and the force vs. displacement curve starts to curve—small plastic deformation creeps in, and you’ll see local yielding at high-stress points, like where coils touch at full compression. Some spring shapes, like Belleville washers or wave springs, are intentionally nonlinear; the force ramps up faster as you push harder. If springs are worked hard and fast—like valve springs in an engine—they permanently lose a bit of length and rate with repeated cycles (spring set). Expect a drop in spring rate of 2–5% in tough applications after the first thousand cycles or so.
Temperature shift is another real-world deviation. As temperature rises, the shear modulus (G) drops for steel—roughly 0.02–0.04% per °C, lowering k. If your spring swings from freezing to 125°C, you could see the rate decrease 3–7%. In fast-moving designs, the effective mass of the spring itself starts to matter: instead of ideal behavior, internal vibration modes crop up at high speeds, and the spring becomes a distributed system, not just a simple kx relationship.
Spring Design Across Engineering Disciplines
In automotive suspensions, engineers use coil springs that don't have a perfectly constant rate. Variable pitch or diameter can make springs soft over small bumps, but prevent full compression on big hits. For a typical passenger car, spring rate might be around 18,500 N/m—supporting the vehicle corner at 3500 N with static deflection of nearly 190 mm. Under hard braking, the extra force moves the front spring further, and the energy stored (and later absorbed by the damper) can be over 1,000 J per spring. In motorsports, ride height and preload directly shift the spring’s operating point, so a stiffer average rate keeps the car from rolling too much even though a softer-start spring feels smooth at low loads.
When you need fine movement, like in a scale or a vibration isolator, you often want a very soft spring. A balance may use k = 0.15 N/m so small forces cause noticeable motion, and with modern sensors, even sub-milligram weights are measurable. Large, heavy platforms that need to block vibration—think electron microscopes—use big, soft spring stacks to get natural frequencies below the environment's. With kilograms of mass and centimeter-scale deflection, static stability is also a concern; you can’t have the whole rig toppling if a spring sags unevenly.
For mechanical energy storage, springs are often run right up to the maximum safe stress and maximum travel. A nail gun, for example, stores a few joules with a stiff spring—it only compresses 32 mm, but the rate might be 45,000 N/m. When released, the stored energy gets dumped in milliseconds to shoot a fastener. Tiny watch springs store surprisingly high energy per gram by pushing steel right to its limits through many turns, keeping torque nearly steady across the wind-down. Here, both geometry and careful material choices keep the output repeatable even as energy is released.
Worked Example: Compression Spring for Mechanical Valve Actuator
Let's say you need a spring to close a pneumatic valve against 285 N of fluid pressure if the actuator fails. The required stroke is 18.5 mm and you have 68 mm of axial space with an outer diameter no more than 22 mm. Here’s how to size it:
Step 1: Required Spring Force and Constant
To beat the max process pressure, you want force a bit higher than 285 N—build in a margin, say 15%, so call it 328 N needed at full stroke. Initial preload has to close against roughly 22 N to handle friction and the unpressurized valve. The required spring rate works out to:
k = ΔF / Δx = (327.8 - 22) / 0.0185 = 16,529 N/m = 16.53 N/mm
Step 2: Spring Geometry and Material Selection
Using music wire (G = 79,300 MPa), and fitting within a 22 mm OD, pick a wire diameter of 2.5 mm, making a mean diameter of 19.5 mm. That gives a spring index of 7.8 (well within the usual range for good performance). Now, back-calculate the number of active coils using:
n = (G·d⁴) / (8·D³·k) = (79,300×10⁶ × 0.0025⁴) / (8 × 0.0195³ × 16,529) ≈ 7.8
Round up to 8—your k drops slightly to 16.15 N/mm.
Step 3: Stress Verification
Check stress using the coil stress formula with the Wahl correction for coil curvature. Using 8 coils and at 328 N, the shear stress comes out to 780 MPa—under the static max for music wire, but over the fatigue limit. That's usually OK for infrequent "fail-safe" valve applications, but not for something cycling 10 million times.
Step 4: Energy Storage and Closure Dynamics
At max compression, stored energy is:
U = ½·k·x² = 0.5 × 16,154 × 0.0185² = 2.76 J
It takes 2.64 J to work against fluid pressure, leaving 0.12 J kinetic energy at full closure. For a 0.42 kg moving mass, this gives a velocity of about 0.76 m/s—fast enough to snap closed in under 0.05 seconds.
Step 5: Installation and Preload Requirements
Add up the installed length, stroke, preload compression, and end thicknesses. This design needs a free length over 74 mm, but only 68 mm is available, so you’ll need to either stiffen the spring or play with coil count to fit everything in—expect operating stress to go up if you do, leaving less safety margin.
Multi-Spring Systems and Series-Parallel Combinations
Real machines often combine multiple springs for a target rate. Put springs in series and you get a lower overall rate than any single one—good if you need more movement from stiff stock parts. Parallel springs just add their rates. For example, a coil spring with k = 25,000 N/m in series with a much stiffer rubber bushing at 180,000 N/m gives a combined rate of about 22,000 N/m, with almost all the stretch happening in the softer element. Leaf and dual-rate coil springs use these same principles, just with more subtlety—layered up, you can get both soft initial movement and stiff stop without exotic parts.
Frequently Asked Questions
▼ Why does Hooke's Law include a negative sign, and when can it be ignored?
▼ How do I determine the spring constant experimentally, and what accuracy can I expect?
▼ What causes the spring constant to change over time, and how do I compensate for spring set?
▼ How does temperature affect spring performance, and what materials work at extreme temperatures?
▼ When do springs stop following Hooke's Law, and how do I model nonlinear spring behavior?
▼ How do I select the optimal spring constant for a vibration isolation or shock absorption application?
Free Engineering Calculators
Explore our complete library of free engineering and physics calculators.
Browse All Calculators →🔗 Explore More Free Engineering Calculators
About the Author
Robbie Dickson — Chief Engineer & Founder, FIRGELLI Automations
Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.
Video Walkthrough - How to Use This Calculator
Need to implement these calculations?
Explore the precision-engineered motion control solutions used by top engineers.
