Spring Calculator

Calculate spring force, elastic potential energy, oscillation period, and frequency using Hooke's law.

Spring force and oscillation
Enter spring stiffness, displacement from equilibrium, and attached mass.

About the spring calculator

An ideal spring exerts a restoring force proportional to its displacement from equilibrium. Hooke's law expresses that relationship as F = −kx, where k is the spring constant and x is displacement. The minus sign indicates that force points opposite the displacement. This calculator reports force magnitude, so the displayed value follows kx while the physical direction remains toward equilibrium. The spring constant measures stiffness in newtons per meter. A larger value requires more force for the same extension or compression. Elastic potential energy equals one half kx squared, representing the work stored while deforming the spring from equilibrium. Energy is never negative in this ideal model because displacement is squared, although the signed force reverses when displacement changes direction. Adding a mass creates a simple harmonic oscillator when damping, friction, gravity shifts, and spring mass can be neglected. Its period is T = 2π√(m/k), and frequency is the reciprocal of period. A stiffer spring oscillates faster, while a larger attached mass oscillates more slowly. Amplitude does not change the ideal oscillator's period, even though it changes maximum force and stored energy. For k = 200 N/m, displacement 0.1 m, and mass 2 kg, the spring force magnitude is 20 N and elastic energy is 1 J. The corresponding ideal period is approximately 0.63 s and frequency is 1.59 Hz. Those values describe small oscillations around equilibrium. In a vertical setup, gravity shifts the equilibrium position but does not change the ideal small-oscillation frequency for a linear spring. Real springs depart from the model. Coils have mass, materials have elastic limits, attachments add compliance, and air resistance or friction dissipates energy. Large deformation can make stiffness nonlinear. Closely wound extension springs may also have initial tension, while compression springs can buckle if poorly guided. Never assume the linear result remains safe beyond the manufacturer's rated travel, load, fatigue life, or solid height. Use the calculator for physics study, initial mechanism sizing, vibration estimates, and consistency checks between force, energy, and frequency. Measure displacement from the loaded equilibrium appropriate to the problem and use the effective moving mass, which may include a fraction of spring mass and attached hardware. For machinery, suspension, launching devices, or safety-critical designs, account for preload, damping, resonance, tolerances, fatigue, impact factors, and boundary conditions with validated engineering methods.

Spring calculation examples

These ideal examples connect static deformation with oscillator behavior.

Spring setupCalculated propertiesInterpretation
k = 200 N/m, x = 0.10 m, m = 2 kg20 N; 1 J; 0.63 s; 1.59 HzA moderately stiff spring with a two-kilogram mass.
k = 80 N/m, x = 0.15 m, m = 1.25 kg12 N; 0.90 J; 0.79 s; 1.27 HzA softer spring and lighter attached mass.
k = 500 N/m, x = 0.02 m, m = 0.5 kg10 N; 0.10 J; 0.20 s; 5.03 HzA stiff, fast oscillator with small travel.
k = 25 N/m, x = 0.40 m, m = 4 kg10 N; 2 J; 2.51 s; 0.40 HzA soft spring carrying a larger mass.

How to calculate spring properties

  1. Enter the spring constant in newtons per meter.
  2. Enter displacement from equilibrium in meters, using either sign for direction.
  3. Enter the effective oscillating mass in kilograms.
  4. Select Calculate Spring to display force magnitude, stored energy, period, and natural frequency.

Spring calculator FAQ

What does the spring constant mean?

The spring constant is force required per unit displacement in the linear elastic range. A higher spring constant describes a stiffer spring.

Why does Hooke's law include a minus sign?

The minus sign shows that spring force opposes displacement and acts toward equilibrium. This calculator displays the magnitude so force and energy are easy to compare.

Does displacement affect oscillation frequency?

Not in the ideal linear simple-harmonic model. Real springs can become nonlinear at large displacement, causing frequency to vary with amplitude.

How does mass affect the period?

Period increases with the square root of mass, so adding mass slows the oscillator. Multiplying mass by four doubles the ideal period when stiffness is unchanged.

Can I use this result to select a real spring?

It is useful for initial calculations but does not establish a safe component rating. Check preload, travel, solid height, buckling, fatigue, damping, tolerances, and manufacturer load limits.