← STEM Learning Studio
Period, frequency & motion at any instant

Simple Harmonic Motion & Pendulum Calculator

Find the period, frequency, and angular frequency of a spring-mass system or a simple pendulum, plus displacement, velocity, and acceleration at any instant.

Spring-Mass System
kg
N/m
m
s
Period
1.2566 s
Angular frequency ω
5 rad/s
Frequency f
0.7958 Hz
x(t)
-0.0801 m
v(t)
-0.2992 m/s
a(t)
2.0029 m/s²
v_max / a_max
0.5 m/s
2.5 m/s²
Simple Pendulum (small-angle)
m
Period
2.0061 s
Angular frequency ω
3.1321 rad/s
Frequency f
0.4985 Hz

About the Simple Harmonic Motion & Pendulum Calculator

Simple harmonic motion (SHM) describes any system where the restoring force is proportional to displacement — a mass on a spring and a pendulum swinging through small angles are the two textbook examples, and both produce the same sinusoidal position, velocity, and acceleration equations, just with a different formula for the angular frequency ω.

Spring-mass angular frequency and period

For a mass m on a spring with stiffness k, Newton's second law (F = ma = −kx) gives the equation of motion for SHM, with angular frequency ω = √(k/m). The period — time for one full oscillation — is T = 2π/ω = 2π√(m/k), and the frequency is simply f = 1/T. Notice a stiffer spring (larger k) or lighter mass both shorten the period.

Position, velocity, and acceleration at time t

With amplitude A and the mass released from maximum displacement at t = 0, position follows x(t) = A·cos(ωt), velocity is its derivative v(t) = −Aω·sin(ωt), and acceleration is a(t) = −Aω²·cos(ωt) = −ω²x(t). The maximum speed, Aω, occurs at the equilibrium position (x = 0); the maximum acceleration, Aω², occurs at maximum displacement, where the restoring force is largest.

The simple pendulum (small-angle approximation)

A pendulum of length L swinging through small angles (roughly under 15°) behaves like SHM with angular frequency ω = √(g/L) and period T = 2π√(L/g) — notably independent of both mass and amplitude. This independence from amplitude is what made pendulum clocks practical: the period stays constant even as the swing gradually decays from friction.

Worked example

Take m = 2 kg and k = 50 N/m. ω = √(50/2) = 5 rad/s, so T = 2π/5 ≈ 1.257 s and f ≈ 0.796 Hz. With amplitude A = 0.1 m, at t = 0.5 s: x = 0.1·cos(2.5) ≈ −0.0801 m, v = −0.1(5)·sin(2.5) ≈ −0.2996 m/s. For a 1 m pendulum, T = 2π√(1/9.81) ≈ 2.006 s — the basis for the "seconds pendulum" historically used to define the second.

Frequently asked questions

Why is the pendulum period independent of mass?

In the small-angle equation of motion for a pendulum, both the restoring torque and the moment of inertia scale with mass identically, so mass cancels out — exactly the same way it cancels out of the incline-friction sliding condition. Only length and gravitational acceleration determine the period.

What happens if the pendulum swing angle is large?

The small-angle approximation (sin θ ≈ θ) breaks down for large swings, and the true period becomes slightly longer than 2π√(L/g), increasingly so as the amplitude grows. This calculator assumes small-angle motion, which is accurate to within about 1% for swings under roughly 20°.

How is the spring-mass period related to the pendulum period?

Both share the same mathematical form, T = 2π/ω — only the formula for ω differs (√(k/m) for a spring, √(g/L) for a pendulum). Any system whose restoring force or torque is proportional to displacement will produce this same 2π/ω period relationship.

What is the physical meaning of the phase in x(t) = A·cos(ωt)?

This calculator assumes the mass starts at maximum positive displacement (x = A) at t = 0, which is why position is a pure cosine with no phase shift. Starting from a different initial condition — for example, released from equilibrium with some initial velocity — would add a phase angle, but the period and frequency stay exactly the same regardless of starting condition.

Related tools & guides

Newton's Second Law & Incline Friction CalculatorProjectile Motion CalculatorNewton's Laws & Mechanics GuideSTEM Exam Prep