Spring Oscillator Calculator — Hooke’s Law, Period & Energy

Enter k (N/m), m (kg), and x (m) to get force, SHM period/frequency, angular frequency, and max potential energy. Private by design—everything runs locally in your browser.

Inputs

Assumptions: ideal linear spring (Hooke’s law), no damping, small oscillations about equilibrium. Horizontal or vertical setups give the same period (gravity just sets equilibrium).

Results

Force at x (Hooke’s Law):
F = −k x (negative sign = restoring toward equilibrium)
Period / Frequency / ω:
T = 2π√(m/k), f = 1/T, ω = √(k/m)
Max potential energy at |x|:
Umax = ½ k A² with A = |x|
Peak velocity / acceleration (from A = |x|):
vmax = ωA, amax = ω²A

What This Spring Oscillator Calculator Does

This spring oscillator calculator helps you explore the classic mass-spring system and how it behaves in simple harmonic motion. With just a few inputs, it estimates the restoring force, oscillation period, frequency, angular frequency, and energy stored in the spring. It is designed for quick intuition and learning, so you can see how changing the spring constant or mass affects the rhythm of the motion.

At the heart of the calculation is Hooke’s law: the spring pulls back with a force proportional to how far it is stretched or compressed. That relation, F = −kx, leads to a smooth back-and-forth motion in which position, velocity, and acceleration follow repeating sine and cosine curves. The calculator uses the standard formulas for a 1D simple harmonic oscillator, including T = 2π√(m/k), f = 1/T, and ω = √(k/m). It also computes the maximum potential energy for the chosen amplitude using U = ½ k A², where A = |x|.

To use the tool, enter the spring constant k in newtons per meter, the mass m in kilograms, and the displacement x in meters. Think of x as how far the mass is pulled from equilibrium before release. Click Calculate to update the results. The output panel shows force, period, frequency, angular frequency, and energy, while the chart plots displacement over time so you can visualize one complete cycle. If you want peak velocity and acceleration, the calculator provides those as well based on the same amplitude.

This kind of mass-spring model appears in many real situations: car suspensions, seismometers, vibration isolators, musical instruments, and even some building designs that manage sway. It is also a core topic in physics and engineering courses because it connects forces, energy, and oscillations in a simple, clean system. Keep in mind that real springs have damping and limits, so the tool is a simplified estimate rather than a full mechanical design simulator.

Educational use only — not for safety-critical design. Real systems have damping, friction, and coil limits.

5 Fun Facts about Springs & Oscillators

Cars bounce once per second

A comfy sedan corner (≈300 kg per wheel) paired with a 15 kN/m spring has a period of 0.89 s (1.1 Hz). That slow bounce keeps potholes from punching passengers.

Ride tuning

Bungee jumps are leisurely oscillators

70 kg on a 65 N/m cord swings with a 6.5 s period. After the drop you bob up and down only about 9 times a minute—plenty of time to scream.

Adrenaline math

Wristwatches sip micro-joules

A 0.3 g balance wheel beating at 5 Hz needs a spring of ~0.3 N/m. A 1 mm swing stores just 1.5×10⁻⁷ J—yet it keeps time for days.

Horology geekery

Seismometers like 1-second springs

Give a 1 kg proof mass a 39 N/m spring and you get a 1 s natural period, perfect for recording long-period earthquake waves without electronics saturating.

Earth listening

Slinky launch energy

Stretching a toy slinky (k ≈ 1.2 N/m) by 0.5 m stores 0.15 J, enough to flick a coin 50 cm high if you could transfer it cleanly.

Playground physics

Explore more tools