Skip to main content

Calculators

Hooke's Law Calculator

Solve F = kx and elastic spring energy.

Hooke's Law Calculator tool

Loading tool…

Jump to a section

About This Tool

Hooke's law describes the ideal linear relationship between the force applied to a spring and how far the spring stretches or compresses from its relaxed length. In its magnitude form, F = kx: force equals the spring constant multiplied by displacement. This calculator solves the relationship in either direction and can also calculate elastic potential energy with E = 1/2 kx^2. It is useful for physics homework, lab checks, mechanical design estimates, and learning how spring stiffness affects force and stored energy.

How To Use It

  1. Choose whether to solve for force, spring constant, extension or compression, or elastic potential energy.
  2. Enter the known positive magnitudes and select matching units. Use displacement from the relaxed spring length, not the total spring length.
  3. Choose the result unit and review the formula shown under the answer.
  4. Use this as an ideal linear-spring calculation only when the spring is within its elastic limit.

Examples

Find spring force

A spring with k = 200 N/m stretched by 5 cm has F = 200 x 0.05 = 10 N.

Find spring constant

If a 12 N force stretches a spring by 6 cm, k = 12 / 0.06 = 200 N/m.

Find extension

A 10 N force on a 200 N/m spring gives x = 10 / 200 = 0.05 m, or 5 cm.

Find stored energy

For k = 200 N/m and x = 5 cm, E = 1/2 x 200 x 0.05^2 = 0.25 J.

Useful Notes

Hooke's law formula

For an ideal linear spring, the restoring force magnitude is F = kx, where F is force in newtons, k is spring constant in newtons per metre, and x is extension or compression in metres.

Direction and sign convention

The vector form is often written with a negative sign because the spring's restoring force points opposite the displacement. This calculator uses positive magnitudes for force and displacement so the result is easier to use in common homework and design estimates.

Elastic potential energy

The energy stored in an ideal spring is E = 1/2 kx^2. Energy increases with the square of displacement, so doubling the extension stores four times as much energy when k stays the same.

Units supported

Force can use N, kN, or lbf. Spring constant can use N/m, N/cm, or lbf/in. Displacement can use m, cm, mm, or inches. Energy can be displayed in J, mJ, or ft-lbf.

Model limitations

Hooke's law is accurate only while the spring behaves approximately linearly and remains within its elastic limit. Real springs may show preload, damping, hysteresis, friction, temperature effects, or permanent deformation.

FAQ

What does the spring constant mean?

The spring constant k measures stiffness. A larger k means more force is needed for the same extension or compression.

Should I enter spring length or extension?

Enter only the change from the relaxed length. For example, if a 10 cm spring becomes 15 cm long, the extension is 5 cm.

Why does Hooke's law sometimes have a minus sign?

The minus sign in vector form shows that the spring force acts opposite the displacement. This calculator uses magnitudes, so it reports positive force and displacement values.

Can this calculate spring energy?

Yes. Choose elastic energy mode to calculate E = 1/2 kx^2 from the spring constant and extension or compression.