Free Hooke's Law Calculator

Solve Hooke's law F = k·x by entering any two of force, spring constant, or displacement — the calculator finds the third and the elastic potential energy.

Enter any two of force, spring constant, or displacement — the third value and the stored energy are calculated.

Results
Force20 N
Spring constant200 N/m
Displacement0.1 m
Elastic potential energy1 J

F = k·x · PE = ½·k·x². Use SI units: force in newtons (N), k in N/m, and displacement x in meters (m). Valid within the spring's elastic limit.

Quick answer

Hooke's law states that the restoring force of an ideal spring is F = k·x, where k is the spring constant (N/m) and x is the displacement from the natural length (m). For example, a spring with k = 200 N/m stretched x = 0.1 m exerts F = 200 × 0.1 = 20 N and stores elastic potential energy of ½·k·x² = ½ × 200 × 0.1² = 1 J. Rearrange the same formula to find k = F/x or x = F/k.

Formula & method

Hooke's law (restoring force)

F = k · x
  • F Spring force in newtons (N)
  • k Spring constant / stiffness in newtons per meter (N/m)
  • x Displacement from the natural (unstretched) length in meters (m)

Rearranged to solve for any variable: k = F / x and x = F / k. The magnitude of the spring's restoring force is F = k·x; the minus sign in F = −k·x only indicates the force opposes the displacement.

Elastic potential energy

PE = ½ · k · x²
  • PE Elastic potential energy stored in the spring in joules (J)
  • k Spring constant (N/m)
  • x Displacement from equilibrium (m)

Equal to the work done to stretch or compress the spring, i.e. the area under the force–displacement line (a triangle of base x and height kx).

Examples

Example 1: Find force from k and x
Input
k = 200 N/m, x = 0.1 m
Result
F = 20 N, PE = 1 J
Why
F = k·x = 200 × 0.1 = 20 N. Elastic potential energy PE = ½·k·x² = ½ × 200 × (0.1)² = ½ × 200 × 0.01 = 1 J.
Example 2: Find spring constant from force and stretch
Input
F = 50 N, x = 0.25 m
Result
k = 200 N/m, PE = 6.25 J
Why
Rearrange to k = F/x = 50 ÷ 0.25 = 200 N/m. The stored energy is PE = ½·k·x² = ½ × 200 × (0.25)² = ½ × 200 × 0.0625 = 6.25 J.
Example 3: Find displacement from force and k
Input
F = 12 N, k = 300 N/m
Result
x = 0.04 m, PE = 0.24 J
Why
Rearrange to x = F/k = 12 ÷ 300 = 0.04 m (4 cm). The stored energy is PE = ½·k·x² = ½ × 300 × (0.04)² = ½ × 300 × 0.0016 = 0.24 J.
Example 4: Compression of a stiff spring
Input
k = 1500 N/m, x = 0.02 m
Result
F = 30 N, PE = 0.3 J
Why
F = k·x = 1500 × 0.02 = 30 N of restoring force. PE = ½·k·x² = ½ × 1500 × (0.02)² = ½ × 1500 × 0.0004 = 0.3 J. The same formula applies whether the spring is stretched or compressed.

When to use this tool

  • Sizing or selecting a spring when you know the required force and the available travel (displacement).
  • Measuring an unknown spring constant in a physics lab from a load and the resulting extension (k = F/x).
  • Calculating the elastic potential energy stored in a stretched or compressed spring for an energy-conservation problem.
  • Checking homework or design numbers for springs, rubber bands, or any roughly linear elastic element operating within its elastic limit.

Common mistakes

  • Mixing units: x must be in meters and k in N/m. Entering displacement in centimeters (e.g. 10 instead of 0.1) inflates the force by 100×. Convert cm to m by dividing by 100, and mm by 1000.
  • Forgetting to square x in the energy formula. PE = ½·k·x² uses x², not x, so doubling the stretch quadruples the stored energy — not just doubles it.
  • Confusing the spring constant k with the force F. k describes the spring's stiffness (a fixed property in N/m); F is the force at one specific displacement and changes as the spring moves.
  • Applying Hooke's law beyond the elastic limit. Real springs only follow F = k·x for small deformations; past the elastic (proportional) limit the relationship becomes nonlinear and the spring may stay permanently deformed.

Frequently asked questions

What is Hooke's law in simple terms?

Hooke's law says the force a spring pushes or pulls with is proportional to how far you stretch or compress it: F = k·x. Double the stretch and you double the force, as long as you stay within the spring's elastic limit. The constant k measures how stiff the spring is.

How do I calculate the spring constant k?

Rearrange Hooke's law to k = F / x. Apply a known force F (in newtons) to the spring, measure the resulting displacement x (in meters), and divide. For example, a 50 N load that stretches a spring 0.25 m gives k = 50 ÷ 0.25 = 200 N/m. A larger k means a stiffer spring.

What are the units of the spring constant?

The spring constant k is measured in newtons per meter (N/m) in SI units. It tells you how many newtons of force are needed to stretch or compress the spring by one meter. Stiff springs have a high k (thousands of N/m); soft springs have a low k.

Why is there a minus sign in F = −kx?

The minus sign shows that the spring's restoring force always points opposite to the displacement — pulling back when stretched and pushing out when compressed. When you only care about the magnitude of the force, you use F = k·x without the sign, which is what this calculator reports.

How much energy does a stretched spring store?

A spring stores elastic potential energy PE = ½·k·x², measured in joules. This equals the work done to deform it. For instance, a 200 N/m spring stretched 0.1 m stores ½ × 200 × 0.1² = 1 J. Because of the x² term, stretching twice as far stores four times the energy.

Does Hooke's law work for any amount of stretch?

No. Hooke's law is only accurate within the elastic (proportional) range of the material. Beyond the elastic limit the force is no longer proportional to displacement, the spring may deform permanently, and F = k·x gives wrong answers. Use it for small, reversible deformations.

Sources & references

External references open in a new tab. We are independent and not affiliated with these organizations.

  • ✓ Free to use
  • ✓ No sign-up required
  • Runs entirely in your browser — nothing is uploaded.
  • ✓ Formula and method shown above

Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the hooke's law calculator to appear: