Simple harmonic motion calculator

Enter the amplitude, how fast the system oscillates (frequency, period or angular frequency), a moment in time and the starting phase. The calculator gives where the mass is, how fast it moves and how hard it accelerates at that moment, along with the peak values and, for a mass on a spring, the spring constant and total energy.

Amplitude unit
Give the speed of oscillation as
Hz
s
°
kg
Displacement x(t)3.0902 cm
Velocity v(t)
-119.5133 cm/s
Acceleration a(t)
-487.9801 cm/s²
Maximum speed Aω
125.6637 cm/s
Maximum acceleration Aω²
1,579.1367 cm/s²
Angular frequency ω
12.5664 rad/s
Frequency f
2 Hz
Period T
0.5 s
Spring constant k = mω²
78.9568 N/m
Total energy ½kA²
0.394784 J

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter the amplitude and choose m, cm or mm; velocity and acceleration come out in the same length unit per second.
  2. Give the frequency in Hz, the period in seconds or the angular frequency in rad/s.
  3. Enter the time t and the phase φ in degrees (0 if the motion starts at x = A).
  4. Enter the mass to get the spring constant and the energy.

Formulas

  • Position: x(t) = A cos(ωt + φ), with ω = 2πf = 2π ÷ T.
  • Velocity: v(t) = −Aω sin(ωt + φ). Acceleration: a(t) = −ω² x(t).
  • Peaks: v max = Aω, a max = Aω².
  • Spring: k = mω², total energy E = ½kA² (A in metres).

Worked example

A = 10 cm, f = 2 Hz, t = 0.1 s, φ = 0, m = 0.5 kg. Then ω = 2π × 2 = 12.5664 rad/s and ωt = 1.2566 rad, which is 72°.

  • x = 10 × cos 72° = 3.0902 cm
  • v = −10 × 12.5664 × sin 72° = −119.5133 cm/s
  • a = −12.5664² × 3.0902 = −487.9801 cm/s²
  • Peak speed 125.6637 cm/s, peak acceleration 1,579.1367 cm/s², period 0.5 s.
  • k = 0.5 × 12.5664² = 78.9568 N/m and E = ½ × 78.9568 × 0.1² = 0.394784 J.

Tips

  • Angles in degrees. The phase box takes degrees; the calculator converts to radians inside.
  • Big t is fine. The motion repeats every period, so t = 10.1 s gives the same state as t = 0.1 s when T = 0.5 s.
  • Damping is ignored. Real oscillators lose amplitude over time; this is the ideal, undamped case.

Frequently asked questions

What is simple harmonic motion?

It is motion back and forth in which the restoring force is proportional to the displacement, F = −kx. A mass on a spring and a pendulum at small angles both move this way, and the position follows a cosine, x = A cos(ωt + φ).

What does the phase angle mean?

The phase φ sets where the cycle starts. With φ = 0 the mass starts at the far end, x = A, at rest. With φ = 90° it starts in the middle moving in the negative direction at full speed.

Why are the velocity and acceleration negative?

The signs give directions along the axis. A negative acceleration while x is positive means the mass is being pulled back toward the centre, which is what a restoring force does. Speed and acceleration are greatest in size at the centre and at the ends respectively.

Why does the calculator ask for a mass?

Only for the spring constant k = mω² and the energy E = ½kA². Position, velocity and acceleration do not depend on the mass.

More in Math

All tools in this category: Math ·Updated November 7, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.