Physics · Oscillations & waves

Simple harmonic motion calculator

Find displacement, signed velocity and acceleration at a specified time in ideal harmonic motion. The phase convention is x = A cos(2πft): at t = 0 the body starts at +A with zero velocity.

Created v1.0

By Thibaut Grzelak, Mechanical Analysis Engineer

Oscillations & waves
01Calculation inputsx = A cos(2πft)
The moving block is placed between −A and +A. The dashed centre is equilibrium; arrows show the velocity and acceleration directions.
Maximum displacement ≥ 0. Phase is fixed at zero.
Strictly positive oscillation frequency.
Time from the positive maximum displacement.
02

Results

Velocity
—

Signed instantaneous velocity.

Acceleration
—

Restoring acceleration toward equilibrium.

Angular frequency
—rad/s

Angular phase rate, in radians per second.

Relation and numerical substitutionx = A cos(2πft)

—

Constant amplitude and frequency, no damping, no forcing; phase fixed at zero.

01Formulas and symbols

Formulas used

ωω = 2 × π × fAngular phase rate, in radians per second.
xx = A × cos(ω × t)Signed position from equilibrium.
vv = −A × ω × sin(ω × t)Signed instantaneous velocity.
aa = −A × ω² × cos(ω × t)Restoring acceleration toward equilibrium.
02Assumptions and limits

Scope of validity

  • Constant amplitude and frequency, no damping, no forcing; phase fixed at zero.
03Validation example

Reference numerical case

  1. A = 0.10 m, f = 1 Hz and t = 0.25 s: ω = 6.283185… rad/s, x = 0, v = −0.6283185… m/s and a = 0.
04References

FAQ

Where is the speed greatest?

At equilibrium x = 0; its magnitude reaches Aω. Acceleration is then zero.

How do I find f for a spring or pendulum?

Use the linked natural-frequency or pendulum calculator, then enter that frequency here to examine the motion over time.

05Model and conventions

Find displacement, signed velocity and acceleration at a specified time in ideal harmonic motion. The phase convention is x = A cos(2πft): at t = 0 the body starts at +A with zero velocity.

06Limits of this model

This gives the instantaneous state, not spring stiffness, natural frequency or the response to an external excitation. Large phase arguments can lose floating-point precision.

07Common mistakes

Frequency in Hz is not angular frequency in rad/s. The velocity and acceleration signs describe direction, not their magnitudes.