Hooke's Law

Calculate spring force, spring constant, or displacement with F = kx. Free online calculator with formulas and step-by-step solutions.

Key formula

F = kx; U = ½kx²

How do you use Hooke's law and elastic PE?

Hooke's law is F = kx. If you know two of F, k, and x, solve for the third: k = F / x or x = F / k. Elastic potential energy stored in the spring is U = ½ k x² (joules). Stretch and compression with the same |x| store the same energy.

About this tool

Hooke's law says the restoring force of an ideal spring is proportional to stretch or compression: F = kx. The work stored while stretching is elastic potential energy U = ½kx². This page keeps F, k, and x rearrangements visible and links spring force to spring energy.

How to use this calculator

  1. Choose the variable you want to solve for and confirm which values are already known.
  2. Enter inputs in consistent units before calculating so the formula is applied correctly.
  3. Check whether the result is physically reasonable by comparing it with the size of the inputs.
  4. Use the step-by-step breakdown to see how the equation was rearranged and evaluated.

Worked examples

Example 1: force from k = 200 N/m and x = 0.15 m

F = kx = (200)(0.15) = 30 N. The spring pulls back with 30 N when stretched 15 cm from equilibrium.

Example 2: elastic PE for the same stretch

Same k = 200 N/m, x = 0.15 m. U = ½(200)(0.15)² = 2.25 J. Force was 30 N; energy is 2.25 J — do not mix the two.

Example 3: find k from F = 40 N and x = 0.080 m

k = F / x = 40 / 0.080 = 500 N/m. Leaving x as 8 cm without converting to 0.080 m would make k wrong by a factor of 100.

Frequently asked questions

What is the Hooke's law formula?

F = kx, where F is the spring force magnitude, k is the spring constant in N/m, and x is the change in length from the unstretched (equilibrium) position in meters.

What is the elastic potential energy formula?

U = ½ k x². It is the work stored in an ideal spring stretched or compressed by x from equilibrium. Units are joules when k is in N/m and x is in meters.

Is the force direction important?

Yes. The restoring force is opposite the displacement. Many homework answers report the magnitude F = kx and state the direction in words. Energy U = ½kx² is a scalar.

What are the units of the spring constant k?

Newtons per meter (N/m). A k of 100 N/m means 100 N of force for each meter of stretch.

When does Hooke's law stop working?

Beyond the elastic limit the spring permanently deforms and F is no longer proportional to x, so U ≠ ½kx² either. Use the linear formulas only when the problem says the spring is ideal or within its elastic range.

Related calculators

  • Velocity
  • Kinetic Energy
  • Work
  • Cross Product
  • Dot Product
  • Kinematics
  • Force
  • Displacement

Calculators in this section · Browse all calculators