Skip to content
Omnikalc

Simple harmonic motion calculator: where is the oscillator and how fast is it moving?

Enter the amplitude, frequency, phase, time and mass to get the displacement, velocity, acceleration, period, maximum values and energies of a harmonic oscillator.

Updated on
Your inputs
m

Value out of range

Hz

Value out of range

°

Value out of range

s

Value out of range

kg

Value out of range

Results

Displacement at time t

0.0309 m

Velocity at time t
-1.1951 m/s
Acceleration at time t
-4.880 m/s²
Period
0.5000 s
Angular frequency
12.5664 rad/s
Maximum speed
1.2566 m/s
Maximum acceleration
15.791 m/s²
Total mechanical energy
0.3948 J
Kinetic energy at time t
0.3571 J
Potential energy at time t
0.0377 J

Springs, pendulums, sound waves and alternating currents all behave as harmonic oscillators. The simple harmonic motion calculator takes the amplitude, the frequency, the initial phase, a time and a mass, and gives the displacement, velocity and acceleration at that time, the period, the angular frequency, the maximum speed and acceleration and the kinetic, potential and total energy.

How the calculation works

  • Enter the amplitude, the frequency and the initial phase of the motion x(t) = A cos(2πft + φ).
  • Enter the time at which you want the state of the oscillator, and the mass to get the energies.
  • The calculator gives the displacement, the velocity and the acceleration at that time, which follow v = −Aω sin(ωt + φ) and a = −ω² x.
  • It also gives the period, the angular frequency ω = 2πf, the maximum speed Aω, the maximum acceleration Aω² and the energies, which add up to ½ m ω² A².

Example

An oscillator with amplitude 0.10 m, frequency 2 Hz and zero phase has ω = 12.57 rad/s and period 0.5 s. At t = 0.1 s the phase is 72°, so the displacement is 0.1 × cos 72° = 0.0309 m, the velocity is −1.195 m/s and the acceleration is −4.88 m/s². The maximum speed is 1.257 m/s and the maximum acceleration 15.79 m/s². With a mass of 0.5 kg, the total energy is 0.395 J, split into 0.357 J of kinetic energy and 0.038 J of potential energy.

Why it matters

The same equations describe many systems, so one calculator can be used to check homework, design a vibration test, or understand how a signal evolves in time. Seeing the energy split between kinetic and potential helps to understand why the motion repeats.

Good to know

The calculator assumes an ideal oscillator without damping or driving, where the amplitude stays constant. It does not derive the frequency from a spring constant or a length: for those, use the spring-mass or pendulum calculators. Angles are in degrees.

The spring-mass calculator finds the frequency of a mass on a spring, the pendulum calculator covers swinging bodies, and the damping ratio calculator shows how losses change the motion.

Frequently asked questions

What is simple harmonic motion?

It is the motion of a system whose restoring force is proportional to the displacement from equilibrium and points back towards it. The position then follows a sine or cosine of time. A mass on a spring and a pendulum at small angles are the classic examples.

How are amplitude, frequency and period related?

The frequency is the number of cycles per second, and the period is its inverse. The amplitude is independent of both in ideal simple harmonic motion: a larger amplitude means a larger maximum speed and acceleration, but not a different period.

Where are the speed and acceleration largest?

The speed is largest when the oscillator passes through the equilibrium position, where the displacement is zero. The acceleration is largest at the turning points, where the displacement is largest and the speed is zero. Energy shifts between kinetic and potential forms but the total stays constant.

Does the phase matter?

The initial phase sets where the oscillator is at time zero. A phase of 0° starts at the maximum displacement, −90° starts at the equilibrium moving in the positive direction, and so on. It shifts the curve in time without changing its shape.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.