Skip to main content

Spring Calculator

Solve spring problems using Hooke’s Law, spring work (area under the F–x curve), simple harmonic motion, vertical equilibrium, and energy swapping (EPE ↔ KE). Includes quick picks, step-by-step, and mini visuals.

Background

For an ideal (linear) spring, force is proportional to displacement: F = −kx. The minus sign means the spring force points opposite the displacement. Energy stored is E = ½kx², and in oscillations energy swaps between spring energy and kinetic energy.

Enter values

Hooke’s law: F = −kx. Solve for F, k, or x.

x in meters (m)
  • x in meters (m)
  • x in centimeters (cm)
  • x in millimeters (mm)
k in N/m
  • k in N/m
  • k in N/cm
mass in kilograms (kg)
  • mass in kilograms (kg)
  • mass in grams (g)

Internally: x in meters, k in N/m, m in kg.

Sign convention: x > 0 means stretch (or downward in vertical mode). Spring force points opposite: F = −kx.

Work done by the spring from x₁ to x₂: W = ½k(x₁² − x₂²).

T = 2π√(m/k)

At equilibrium: mg = kx (downward stretch).

Total energy: E = ½kx² + ½mv². At equilibrium (x=0) speed is max.

Options:

If set, the calculator will warn when |x| exceeds x_safe. If not set, it warns when |x| > 0.5 m.

Chips fill values and solve immediately.

Result:

No results yet — enter values and click Calculate.

How to use this calculator

  • Choose a mode (Hooke’s law, work, SHM period, vertical equilibrium, or energy swap).
  • Select your preferred units for x, k, and m.
  • Enter values and click Calculate.
  • Turn on step-by-step and visuals for extra intuition.

How this calculator works

  • Step 1 — Pick a mode. The calculator uses a different model depending on what you’re solving: Hooke’s law, spring work, SHM period, vertical equilibrium, or energy swap.
  • Step 2 — Convert everything to “physics units” internally. Displacement x is converted to meters (m), spring constant k to N/m, and mass m to kg. Results are then displayed in the units you selected.
  • Step 3 — Apply the correct relationship for that mode. For example, Hooke’s law uses the restoring-force idea (force points back toward equilibrium), spring work is computed from the change in spring energy between x₁ and x₂, and SHM period depends only on m and k (not amplitude).
  • Sign convention matters. In Hooke’s law mode, the spring force is opposite the displacement: a positive stretch (x > 0) produces a negative force (F < 0). If you enable “Treat x as magnitude”, the calculator uses |x| where that makes physical sense.
  • Visuals (when enabled). The mini visuals illustrate: (1) the linear F–x relationship (slope = k), and/or (2) how energy splits between spring energy and kinetic energy at your chosen position x.
  • Safety warning (optional). If you enter x_safe, the calculator flags when |x| exceeds it (or warns at |x| > 0.5 m if no safe limit is provided).

Formula & Equation Used

Hooke’s law (restoring force): F = −kx (F in N, k in N/m, x in m)

Spring potential energy: U = ½kx² (U in J)

Work done by the spring (x₁ → x₂): W = ½k(x₁² − x₂²) (W in J; positive means the spring gives energy to the mass)

SHM period (mass–spring): T = 2π√(m/k) (T in s, m in kg)

Vertical equilibrium stretch: mg = kx (g ≈ 9.80665 m/s²)

Total energy (energy swap): E = ½kx² + ½mv² (E in J, v in m/s)

Example Problems & Step-by-Step Solutions

Example 1 — Hooke’s law force

A spring has k = 200 N/m and is stretched x = 0.10 m. Find the spring force.

  1. F = −kx
  2. F = −(200)(0.10)
  3. F = −20 N (points back toward equilibrium)

Example 2 — Spring work from x₁ to x₂

A spring has k = 200 N/m. It moves from x₁ = 0.20 m to x₂ = 0.05 m. Find the work done by the spring.

  1. W = ½k(x₁² − x₂²)
  2. W = 0.5 × 200 × (0.20² − 0.05²)
  3. W = 100 × (0.04 − 0.0025) = 3.75 J

Example 3 — SHM period

A mass m = 0.50 kg is attached to a spring with k = 200 N/m. Find the period of oscillation.

  1. T = 2π√(m/k)
  2. T = 2π√(0.50/200)
  3. T ≈ 0.314 s

Frequently Asked Questions

Q: Is Hooke’s law always accurate?

It’s accurate for an ideal linear spring. Real springs can stop behaving linearly if stretched too far.

Q: What does the minus sign mean in F = −kx?

It means the spring force always points opposite the displacement — back toward equilibrium.

Q: What is the difference between work done by the spring and work done on the spring?

Work done by the spring is energy the spring gives to the mass. Work done on the spring is the energy you put into stretching it. They are equal in magnitude but opposite in sign.

Q: Why does a stiffer spring oscillate faster?

A larger k means a larger restoring force for the same displacement, so the mass accelerates faster and the period decreases.

Newton’s Second Law Calculator
Solve force, mass, and acceleration using Newton’s Second Law
Fourier Series & Signal Analyzer Calculator
Analyze Fourier series, harmonics, waveform reconstruction, and signal spectra with visual step-by-step explanations
Frequency Calculator
Calculate f, T, λ, ω, and rpm ↔ Hz with smart unit conversions
Force Calculator
Calculate net force, acceleration, equilibrium, and force components with diagrams and step-by-step solutions
Laplace Transform Calculator
Calculate Laplace transforms, inverse transforms, differential equations, and circuit responses step by step
Simple Harmonic Motion Calculator
Calculate SHM period, frequency, displacement, velocity, acceleration, energy, and amplitude with visuals.
Elastic Potential Energy Calculator
Calculate spring energy using E = ½kx², plus force, displacement, and k
Velocity Calculator
Calculate velocity using average, instantaneous, acceleration, and 2D vectors
Work–Energy Calculator
Calculate work, net work, and speed changes using work–energy
Work and Power Calculator
Calculate work and power using P = W/t, W = F·d·cos(θ), or P = F·v
Kinetic Energy Calculator
Calculate kinetic energy, speed, and rolling motion with clear visuals
Acceleration Calculator
Calculate acceleration using velocity, time, force, and mass
Free Body Diagram Generator
Build, visualize, and analyze forces with interactive free body diagrams and step-by-step explanations
Simple Pendulum Calculator
Calculate pendulum period, frequency, length, gravity, and swing motion with animated physics visuals
Watt Calculator
Calculate power in watts from energy, force, or torque
Back to all calculatorsAll calculators