Whether you're building a mass-spring damper, setting up a vibration isolator for a microscope, or running numbers for an LC circuit, you'll end up using the math behind sinusoidal motion driven by a force that pulls back harder the further you move from equilibrium. This Simple Harmonic Motion Calculator lets you quickly get displacement, velocity, acceleration, period, frequency, angular frequency, and total mechanical energy using amplitude, frequency, time, phase, mass, and spring constant. These calculations show up everywhere: mechanical design, building dynamics, and basic circuit work. You'll find the standard SHM equations, a worked example for vibration isolation, practical explanations, and a straight-shooting FAQ below.
What is Simple Harmonic Motion?
Simple harmonic motion (SHM) happens when something moves back and forth and the force pulling it toward its starting point always gets bigger as it moves further out. In practice, this means a smooth, predictable, sine-wave pattern. You’ll see this anytime a pendulum swings, a spring bounces, or alternating current flows through a circuit. The pattern is the same, the force is always aimed at “home base,” and grows with displacement.
Simple Explanation
Picture a weight on a spring. Pull it down, let go, and it just keeps bouncing up and down with a steady beat. The more you pull, the more the spring fights back—that's where the “harmonic” part comes from. This isn’t just springs: guitar strings, swaying buildings, even voltage in some circuits behave the same way if you break it down—always the same kind of restoring force, always the same basic math.
📐 Browse all 1000+ Interactive Calculators
Quick Navigation
Simple Harmonic Motion Diagram
Simple Harmonic Motion Calculator
How to Use This Calculator
This calculator is intended for education, concept evaluation, and preliminary design. Results are based on the equations and assumptions described on this page, but cannot account for every real-world load case, tolerance, material property, environmental condition, installation detail, safety factor, code, or regulatory requirement. Verify all inputs, assumptions, units, and results independently before selecting components or using the result in a real application. Safety-critical, structural, medical, lifting, transportation, or regulated applications must be reviewed by a qualified engineer.
- Select your Calculation Mode from the dropdown — choose what you want to solve for (displacement, velocity, acceleration, period, energy, or angular frequency).
- Enter the required input values for your chosen mode — amplitude, angular frequency, time, phase angle, mass, spring constant, period, or frequency as shown.
- Adjust the Phase Angle φ if your system doesn't start at maximum displacement (leave at 0 if starting from rest at peak).
- Click Calculate to see your result.
Simple Harmonic Motion Interactive Visualizer
Watch how changing amplitude, frequency, and phase affects oscillation patterns in real-time. Visualize the energy exchange between kinetic and potential as the mass moves through its cycle.
DISPLACEMENT
1.00 m
VELOCITY
0.00 m/s
ACCELERATION
-4.0 m/s²
PERIOD
3.14 s
FREQUENCY
0.32 Hz
ENERGY
2.00 J
FIRGELLI Automations — Interactive Engineering Calculators
Simple Harmonic Motion Equations
Simple Example
A mass on a spring oscillates with amplitude A = 0.5 m and angular frequency ω = 2 rad/s, starting at zero phase. At t = 1 s:
- Displacement: x = 0.5 × cos(2 × 1 + 0) = 0.5 × cos(2) ≈ −0.208 m
- Velocity: v = −0.5 × 2 × sin(2) ≈ −0.909 m/s
- Max velocity: vmax = Aω = 0.5 × 2 = 1.0 m/s
Displacement Equation
Use the formula below to calculate displacement in simple harmonic motion.
x(t) = A cos(ωt + φ)
Where:
- x(t) = displacement from equilibrium at time t (meters, m)
- A = amplitude, maximum displacement (meters, m)
- ω = angular frequency (radians per second, rad/s)
- t = time (seconds, s)
- φ = phase angle or initial phase (radians)
Velocity Equation
Use the formula below to calculate instantaneous velocity in simple harmonic motion.
v(t) = -Aω sin(ωt + φ)
vmax = Aω
Where:
- v(t) = instantaneous velocity (meters per second, m/s)
- vmax = maximum velocity, occurs at equilibrium position (m/s)
Acceleration Equation
Use the formula below to calculate instantaneous acceleration in simple harmonic motion.
a(t) = -Aω² cos(ωt + φ) = -ω²x(t)
amax = Aω²
Where:
- a(t) = instantaneous acceleration (meters per second squared, m/s²)
- amax = maximum acceleration, occurs at maximum displacement (m/s²)
Period, Frequency, and Angular Frequency
Use the formula below to calculate period, frequency, and angular frequency for a mass-spring system.
ω = 2πf = 2π/T = √(k/m)
T = 2π√(m/k) f = 1/T
Where:
- T = period, time for one complete oscillation (seconds, s)
- f = frequency (hertz, Hz or cycles per second)
- k = spring constant (newtons per meter, N/m)
- m = mass (kilograms, kg)
Energy Equations
Use the formula below to calculate mechanical energy in simple harmonic motion.
E = ½kA² = ½mω²A²
KE(t) = ½mv²(t) PE(t) = ½kx²(t)
Where:
- E = total mechanical energy (constant for undamped SHM) (joules, J)
- KE(t) = kinetic energy at time t (joules, J)
- PE(t) = potential energy at time t (joules, J)
Theory & Practical Applications of Simple Harmonic Motion
If you strip things back, SHM is what you get whenever a system has a force that pulls back toward equilibrium—harder the further it’s displaced. The key is acceleration always heads for “center” and scales with displacement: a = -ω²x. That’s why so many different systems can be boiled down to the same equation. In the real world, SHM is always an approximation—good enough when the motion is small enough that the restoring force looks like a straight line. Out past that range, nothing behaves like a textbook oscillator.
The Phase Space Perspective and Energy Conservation
Engineers and physicists often look at phase space—velocity versus displacement—because it shows the real shape of the system’s energy. For SHM, you get an ellipse, and if nothing is being lost to friction, that ellipse stays steady and tells you energy isn’t trickling out. If you start to see spirals instead, the system is losing energy to damping. This is how you can spot trouble in something like a bridge or a cable—if the ellipse grows or spirals, you know energy is getting in (possibly at just the wrong frequency). Phase plots can quickly show the difference between underdamped, critically damped, and overdamped responses without going through equations.
In SHM, energy keeps moving back and forth: potential when the mass is farthest from equilibrium, kinetic when it flies through its center position. The total energy in a cycle is steady (neglecting friction or air resistance). This phase shift—kinetic and potential energy peaking a quarter-period apart—is useful in precision timing, like crystal oscillators, because it makes frequency less sensitive to small changes in amplitude.
The Non-Intuitive Amplitude Independence
One thing that trips up students and even some engineers: in true SHM, the period doesn’t care about amplitude. You can have a 1 cm or 10 cm swing; frequency stays the same, as long as you’re within the “linear” range of the spring or restoring force. In real builds, you’ll hit nonlinearity if you stretch a spring too far—coils might bottom out, or the material won’t obey Hooke’s law. If your job depends on consistent frequency (like in a seismometer or an accurate clock), you need to make sure the oscillation always stays in the linear zone. For pendulums, the period starts shifting noticeably with angles over about 15°, so high-precision versions go out of their way to keep the angle small or use special corrections.
If you ignore that small-angle rule, the pendulum slows down at higher amplitudes. Fancy old clocks sometimes forced the bob onto a cycloidal path to keep periods equal no matter how far the pendulum swung. Modern designs use electromagnetic drivers and sensors to keep everything close to a fixed, tiny amplitude.
Resonance and the Catastrophic Harmonic Oscillator
If something outside forces your system right at its natural frequency (matching ωdrive to ω0), amplitude can ramp up unchecked unless you’ve got damping. In practice, all real systems have losses, so you’ll never get truly infinite amplitude, but you can get destructive vibrations—especially if the system is lightly damped and large input energy is present. How sharply your system responds at resonance depends on the “quality factor” Q, which is set by how much energy leaks out with each cycle. High-Q systems like tuning forks or quartz crystals ring for a long time; heavy machinery is usually built with enough damping to keep Q reasonable and avoid accidents.
Sometimes disaster hits because distinct vibration modes couple together—one mode feeds energy into another. The Tacoma Narrows Bridge is a classic example: not just matching wind frequency, but energy fed in via aerodynamic instability, building up a swinging motion mode that wasn't anticipated by the simple mass-spring math. Engineers now regularly add tuned mass dampers—big pendulums or equivalent devices—to skyscrapers. These absorbers are set just out of phase with the swaying of the building, slashing the amplitude. Real-world performance depends on tight tuning and regular checks, since both the mass and the building stiffness can change over time (seasonal effects, aging materials).
Multi-Degree-of-Freedom Systems and Normal Modes
When you join multiple oscillators together, the resulting system has several characteristic frequencies, or normal modes. Each mode has its own shape and frequency. In something like a set of two masses connected by springs, you get one mode where both move together, and another where they move in opposite directions. Real vibration problems—cars, buildings, even molecules—boil down to combinations of these modes. Engineers use matrix math or software to break things up into normal modes, since each can be handled like an independent oscillator for analysis purposes.
On the molecular level, each unique normal mode produces distinct frequency peaks in infrared spectra. The frequencies reflect both mass and stiffness (bond strength), so spectroscopists identify materials, isotopes, or even weak interactions with surprising precision—down to levels where minute frequency shifts mean something's changed in the chemical environment.
Worked Example: Vibration Isolation for Precision Instrumentation
Problem: An electron microscope with mass m = 1250 kg sits on a vibration isolation table to eliminate building vibrations at fbuilding = 23.7 Hz (ωbuilding = 149 rad/s). Design a passive isolation system using four spring-damper units arranged symmetrically. Calculate: (a) required spring constant per unit for isolation cutoff at 3 Hz, (b) expected amplitude reduction at building frequency, (c) maximum stroke (displacement range) the isolation must accommodate for 2 mm building floor displacement at resonance, (d) damping coefficient to achieve 15% critical damping preventing resonant amplification during system startup, (e) phase lag between floor motion and microscope response at operating frequency.
Solution:
Part (a): Spring constant calculation
For vibration isolation to work, the table’s natural frequency needs to be much lower than the disturbing frequency. With f0 = 3.0 Hz, the ratio r = 23.7/3.0 = 7.9 (higher means better isolation, aim for r > 2.5).
Natural frequency for four springs in parallel:
ω0 = 2πf0 = 18.85 rad/s
ktotal = mω0² = 1250 kg × (18.85 rad/s)² = 444,200 N/m
kper unit = ktotal/4 = 111,050 N/m ≈ 111 kN/m
Each spring needs to carry about 111 kN/m. Most off-the-shelf air springs or elastomer isolators in this range give about 25-50 mm static deflection with load.
Part (b): Amplitude reduction (transmissibility)
For no damping, transmissibility at frequency ratio r:
T(r) = |1/(1 - r²)| = |1/(1 - 62.41)| = 1/61.41 = 0.0163
This knocks down vibration amplitude by better than 98%—so, a 2 mm floor vibration gets trimmed to just 0.033 mm on the table, meeting tight requirements for electron beam stability.
Part (c): Maximum stroke requirement
At resonance, transmissibility rises (especially if damping is light). With ζ = 0.15, peak transmissibility:
Tmax = 1/(2ζ) = 3.33
If the floor moves 2 mm at resonance:
Atable = 3.33 × 2 mm = 6.67 mm
Allowing for both directions (±), design for at least 13.3 mm total range. Most tables allow 10–20 mm, and often have end stops to avoid overtravel.
Part (d): Damping coefficient
Critical damping:
ccrit = 2√(km) = 47,140 N·s/m
15% critical damping:
c = 0.15 × 47,140 = 7,071 N·s/m total
cper unit = 1,768 N·s/m per damper
Use light damping to keep high-frequency isolation effective, but still control startup transients. Field-tuned viscous dampers let you dial in the needed resistance.
Part (e): Phase lag
At the operating frequency, phase angle between floor and table:
tan(φ) = (2ζr)/(1 - r²) = -0.0386
φ = arctan(-0.0386) = -2.21° ≈ -0.0386 radians
So the table lags by 2.21°, which over a 0.0422 s cycle comes to about 0.26 ms—a negligible lag for most isolation needs. Big lags only show up near resonance or if damping is very high, which you'd usually avoid in vibration isolation work.
Verification: If you check transmissibility at 6 Hz (T = 0.0621, about 94% reduction) and at 1.5 Hz (T = 0.503, about 50% reduction), you see this isolation scheme covers the critical upper frequencies but doesn't worsen low-frequency motion much. The setup balances good isolation with stability for real installations.
Nonlinear Oscillators and the Duffing Equation
Most real-world systems behave linearly only over a certain range; start pushing the limits and you get nonlinear effects. Add a cubic restoring force, for example, and you get a Duffing oscillator: F = -kx - αx³. Depending on sign and size of α, the restoring force either stiffens (hardening, α > 0) or softens (α < 0) with amplitude. That changes how the period depends on amplitude, which can be handy if you're designing vibration harvesters for wide frequency ranges, or a problem if you want stable tuning.
Some systems behave like a Van der Pol oscillator. Here, nonlinear damping causes oscillations to settle to a particular amplitude, regardless of the starting point. It's a good model for biological rhythms (like heartbeats), where the system needs to lock onto a consistent timing even when disturbed. Engineers use similar control in things like pacemakers, only kicking in when phase starts to drift, rather than forcing a rhythm all the time.
Frequently Asked Questions
Free Engineering Calculators
Explore our complete library of free engineering and physics calculators.
Browse All Calculators →🔗 Explore More Free Engineering Calculators
- Bolt Torque Calculator — Preload and Clamp Force
- Omni-Wheel Robot Velocity Resolver
- Joint Friction & Damping Coefficient Calculator
- Newton's Second Law Calculator — F=ma
- Friction Coefficient Calculator
- Conservation Of Momentum Calculator
- Elastic Constants Calculator
- Reynolds Number Calculator — Laminar or Turbulent
- Factor of Safety Calculator
- Von Mises Stress Calculator — Combined Loading
About the Author
Robbie Dickson — Chief Engineer & Founder, FIRGELLI Automations
Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.
📹 Video Walkthrough — How to Use This Calculator
📹 Video Walkthrough — How to Use This Calculator
Need to implement these calculations?
Explore the precision-engineered motion control solutions used by top engineers.
