Calculate the period, frequency, position, velocity, and acceleration of simple harmonic motion for a mass-spring system.
Mass-spring system
Mass attached to the spring, in kilograms (kg).
Stiffness of the spring, in newtons per metre (N/m).
Maximum displacement from equilibrium, in metres (m).
Position, velocity & acceleration at time t
Elapsed time since maximum displacement, in seconds (s).
Maximum speed and maximum acceleration occur as the mass passes through — and momentarily reverses at — the extremes of its swing. Both are calculated from the mass, spring constant, and amplitude entered above; no additional input is needed.
Result
—
Enter values above to compute.
4 min read3 steps7 terms3 examples6 FAQsω = √(k / m)
Simple harmonic motion (SHM) describes the smooth, repeating back-and-forth motion of a mass on a spring, a swinging pendulum at small angles, or any system where the restoring force scales directly with displacement.
📋
Walk-through
How to Use This Calculator
3 steps▸
1
Describe the mass-spring system
Enter the mass attached to the spring in kilograms, the spring constant in newtons per metre, and the amplitude of the oscillation in metres. These three values fully define the motion — the period and frequency update instantly as you type.
2
Read the period and frequency
The result card always shows the period (how long one full back-and-forth cycle takes) and the frequency (how many cycles happen per second). These depend only on the mass and spring constant, never on the amplitude.
3
Switch views for position, velocity, or max values
Use the Position/Velocity tab to enter a specific time and see where the mass is, how fast it's moving, and its acceleration at that instant. Use the Max Values tab to see the peak speed and peak acceleration reached during the swing.
⚡
Reference
Formula & Methodology
4 formulas▸
Angular frequency
ω = √(k / m)
The angular frequency ω (in radians per second) depends only on the spring constant k (N/m) and the mass m (kg). A stiffer spring or a lighter mass both increase ω, making the oscillation faster.
Period and frequency
T = 2π / ω, f = 1 / T
The period T (seconds) is the time for one complete cycle. The frequency f (Hz) is the number of cycles per second. Neither depends on the amplitude — a mass-spring system takes the same time to complete a swing whether it starts small or large.
Assuming the mass is released from rest at maximum displacement (t = 0), position x, velocity v, and acceleration a all vary sinusoidally with time, each 90° out of phase with the one before it.
Maximum velocity and acceleration
v_max = Aω, a_max = Aω²
The mass moves fastest as it passes through the equilibrium point (v_max) and accelerates hardest at the extremes of its swing, where it momentarily reverses direction (a_max).
📖
Glossary
Key Terms Explained
7 terms▸
Simple harmonic motion ↗Oscillatory motion where the restoring force is directly proportional to displacement from equilibrium and points back toward it, producing a smooth, repeating sinusoidal pattern over time.
Angular frequency ↗Denoted ω, the rate of change of the oscillation's phase angle, measured in radians per second. It sets how quickly the system cycles and equals √(k/m) for a mass-spring system.
Period ↗The time, in seconds, for the oscillating mass to complete one full cycle — from maximum displacement, through equilibrium, to the opposite extreme, and back again.
Amplitude ↗The maximum displacement of the mass from its equilibrium (resting) position, measured in metres. A larger amplitude means a wider swing but does not change the period.
Phase ↗The argument ωt inside the cosine and sine functions, describing where in the oscillation cycle the system currently sits. It advances linearly with time at a rate of ω radians per second.
Restoring force ↗The force that always acts to push the mass back toward equilibrium. For a spring, it follows Hooke's law, F = -kx, and its proportionality to displacement is what makes the motion simple harmonic.
Oscillation ↗Repeated back-and-forth movement around a central equilibrium point. Simple harmonic motion is the simplest and most common mathematical model of oscillation in physics.
👥
Scenarios
Real-World Examples
3 worked examples▸
🔩
Physics student
Standard lab spring
Mass (m) 0.5 kgSpring constant (k) 200 N/m
With ω = √(200 / 0.5) = 20 rad/s, the period comes out to T = 2π/20 ≈ 0.314 s and the frequency to f ≈ 3.18 Hz. The spring constant is the input that moves the result the most — doubling k shortens the period by a factor of √2, while doubling the mass lengthens it by the same factor.
🎯
Instructor
Max speed and acceleration
Amplitude (A) 0.1 mAngular frequency (ω) 20 rad/s
Using vmax = Aω = 0.1 × 20 = 2 m/s and amax = Aω² = 0.1 × 400 = 40 m/s², the mass reaches 2 m/s as it crosses equilibrium and experiences 40 m/s² of acceleration at each extreme of its 0.1 m swing.
⏱️
Homework check
Position at a specific time
Time (t) 0.05 sω, A (from above) 20 rad/s, 0.1 m
At t = 0.05 s, ωt = 1 radian, so x = 0.1·cos(1) ≈ 0.054 m — just over half way back toward equilibrium from the starting extreme, with velocity and acceleration following the matching sine and cosine terms at that same phase.
🔗
Reference
Cite This Calculator
APA & MLA▸
Use either format to cite this calculator in a paper, report, or resource list.
APA
MLA
📄
Deep Dive
Understanding the Simple Harmonic Motion Calculator
Simple harmonic motion (SHM) describes the smooth, repeating back-and-forth motion of a mass on a spring, a swinging pendulum at small angles, or any system where the restoring force scales directly with displacement. This calculator models the classic mass-spring case, turning three physical inputs — mass, spring constant, and amplitude — into the full picture of how the system moves over time.
How the Simple Harmonic Motion Calculator works
▸
The calculator starts from Newton's second law applied to a spring obeying Hooke's law, F = -kx. Solving that differential equation shows the mass oscillates with angular frequency ω = √(k/m), independent of how far it's pulled back. From ω, the period T = 2π/ω and frequency f = 1/T follow directly. Assuming the mass is released from rest at its maximum displacement, its position at any later time is x(t) = A·cos(ωt), with velocity and acceleration obtained by differentiating that expression once and twice respectively.
Inputs and what they mean
▸
Mass (m) and spring constant (k) together set the timing of the oscillation — how fast it repeats — through ω = √(k/m). Amplitude (A) sets the scale of the motion — how far the mass travels — but has no effect on the period or frequency, a defining feature of simple harmonic motion. Time (t), used only on the Position/Velocity tab, lets you sample the motion at any instant to see exactly where the mass is and how it's moving.
Limits and edge cases
▸
This model assumes an ideal, massless spring with no friction or air resistance, so the amplitude never decays — real systems lose energy and the motion is technically damped harmonic motion. It also assumes the mass is released from rest at maximum displacement (t = 0 at the amplitude extreme); if your system starts at a different point in its cycle, the position/velocity/acceleration values will be phase-shifted from what's shown here, though the period and frequency remain unchanged either way.
❓
Questions
Frequently Asked Questions
6 questions▸
What is the formula for simple harmonic motion?+
The angular frequency is ω = √(k/m), where k is the spring constant and m is the mass. Position over time follows x(t) = A·cos(ωt), where A is the amplitude — the same ω that sets the period also drives the position, velocity, and acceleration equations.
How do you find the period of simple harmonic motion?+
Once you know the angular frequency ω, the period is T = 2π/ω. For a mass-spring system this expands to T = 2π√(m/k) — a heavier mass or a softer (lower-k) spring both increase the period, making the oscillation slower.
What is the maximum velocity in simple harmonic motion?+
The maximum velocity is vmax = Aω, reached as the mass passes through the equilibrium position. It's directly proportional to both the amplitude and the angular frequency, so doubling either one doubles the peak speed.
What is the maximum acceleration in simple harmonic motion?+
The maximum acceleration is amax = Aω², reached at the two extremes of the swing where the mass momentarily stops and reverses direction. Because it scales with ω², a stiffer spring or lighter mass increases peak acceleration much faster than it increases peak velocity.
Does amplitude affect the period of simple harmonic motion?+
No. For ideal simple harmonic motion, the period depends only on the mass and the spring constant (T = 2π√(m/k)) — a wider swing and a narrower swing of the same system take exactly the same amount of time to complete one cycle.
How is a pendulum different from a mass-spring oscillator?+
A simple pendulum swinging at small angles also exhibits simple harmonic motion, but its angular frequency depends on gravity and length (ω = √(g/L)) rather than on a spring constant and mass. Use the dedicated Pendulum Calculator for that system — the underlying sinusoidal math is the same, only the formula for ω changes.
📄
Save & share
Get a branded PDF of your results
Download a one-page PDF of your numbers instantly. Add your email to also get our occasional calculator tips — no spam, unsubscribe anytime. Privacy.