🔬
🔬 Science & engineering

Simple Harmonic Motion Calculator (x, v and a at time t from amplitude and period)

Results update as you type.

Your numbers

Understanding the simple harmonic motion calculator — concept and principle

This calculator gives the position, velocity and acceleration of a simple harmonic oscillator at any moment, from the amplitude, the period, frequency or mass and spring constant, and the phase. It also shows the angular frequency, maximum speed and acceleration, and how the energy is split. It is used for springs, pendulums and physics homework.

Simple harmonic motion at 0.3 sA mass bobbing with a 2 s periodAmplitude0.1 mPeriod2 st0.3 sω = 2π ÷ 2 = 3.142 rad/sx = 0.1 cos 54°Position0.05878 mVelocity−0.2542 m/sKinetic share65.5 %
At 54° into the cycle the mass sits at 0.59 of its amplitude, heading toward the centre.

How it is calculated

x(t) = A cos(ωt + φ)

v(t) = −A ω sin(ωt + φ)

a(t) = −A ω² cos(ωt + φ) = −ω² x

ω = 2π ÷ T = 2π f, or ω = √(k ÷ m)

Kinetic share of energy = sin²(ωt + φ)

The principle

Simple harmonic motion occurs whenever a restoring force is proportional to displacement, as with a spring. That makes the acceleration proportional to −x, and the solution is a sine or cosine wave. The object moves fastest through the centre and stops momentarily at the ends, where its acceleration is largest. The total energy ½kA² is constant and moves back and forth between kinetic and potential forms.

Worked example

Default inputs: A = 0.1 m, period 2 s, φ = 0°, t = 0.3 s.

  1. ω = 2π ÷ 2 = 3.142 rad/s; T = 2 s.
  2. Phase = π × 0.3 = 0.9425 rad (54°).
  3. x = 0.1 cos 54° = 0.05878 m.
  4. v = −0.1 × 3.142 × sin 54° = −0.2542 m/s; a = −3.142² × 0.05878 = −0.5801 m/s².
  5. Maximum speed = 0.3142 m/s; maximum acceleration = 0.987 m/s²; kinetic share = sin² 54° = 65.5%.
How Displacement x(t) changes with Period or frequencyHow Displacement x changes with Period o…-0.1-0.0500.050.10.511.522.534Example: 0.05878Period or frequency
Each point is the calculator re-run with only “Period or frequency” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Period or frequencyDisplacement x(t)
0.5-0.0809
1-0.0309
1.50.0309
20.05878
2.50.0729
30.0809
40.0891

How to read the result

At t = 0.3 s the mass is above the centre and moving back towards it, so velocity and acceleration are both negative. The kinetic share shows that about two thirds of the energy is in motion at that moment. The period does not depend on amplitude in ideal SHM.

Common mistakes

Keep in mind: Real oscillators lose energy to damping. Use a damped-oscillation model when losses matter.

Frequently asked questions

Where is the speed greatest?

At the centre, where x = 0.

Where is the acceleration greatest?

At the turning points, where |x| = A.

Does the period depend on amplitude?

Not in ideal simple harmonic motion.

How do I get ω from a spring?

ω = √(k/m).

Sources: OpenStax, University Physics Volume 1 (2016), chapter 15 key equations

Checked 9 Nov 2026. OpenStax, University Physics Volume 1 (2016), Chapter 15 Key Equations: x(t) = A cos(ωt + φ), v(t) = −Aω sin(ωt + φ), a(t) = −Aω² cos(ωt + φ), |vmax| = Aω, |amax| = Aω², ω = √(k/m), E = ½kA²; §15.1 (ω = 2π/T = 2πf).

🔬 All science & engineering tools →🌍 Calculators by country →