Simple Harmonic Motion Calculator

Simple Harmonic Motion Calculator gives displacement, velocity and acceleration at any time t, for a spring or a pendulum, with the phase constant and the time to reach a position.

Quick Setup

x = A sin(ω t + φ), with ω = 2π f.

Phase, Form, Units, Massφ 0°, sine, SI

Phase 0 with the sine form starts at the center, moving in the positive direction.

Displacement at 1.4 s
−14.27 mm
x = A sin(ω t + φ), with ω = 3.142 rad/s and a phase of 252° at this moment
−14.56 mm/s Velocity
Maximum Speed (A ω)47.12 mm/s
Share of Top Speed30.9%
Velocity is the slope of the displacement. It is greatest at the center and zero at each end.
0.1408 m/s² Acceleration
Maximum Acceleration (A ω²)0.148 m/s²
Peak Acceleration in g0.0151 g
Acceleration always points back to the center and is greatest at the ends of the swing.
2 s Period
Angular Frequency (ω)3.142 rad/s
Cycles Completed0.7 cycles
Period, frequency and angular frequency describe the same rhythm: ω = 2π f = 2π ÷ T.
44.27 mm Distance Travelled
Next End of Swing In100 ms
Next Pass Through Center In600 ms
Path length counts every back-and-forth, so it keeps growing while displacement repeats.
Step-by-Step Calculation−14.27 mm
  1. Angular frequency: ω = 2π × f = 2π × 0.5 = 3.14159 rad/s
  2. Amplitude: A = 15 mm = 0.015 m
  3. Phase at this time: ω t + φ = 3.14159 × 1.4 + 0 = 4.39823 rad
  4. x = A × sin(ω t + φ) = 0.015 × sin(4.39823) = −0.0142658 m = −14.27 mm
  5. Velocity: v = A × ω × cos(ω t + φ) = −0.0145621 m/s
  6. Acceleration: a = −ω² × x = −3.14159² × (−0.0142658) = 0.140798 m/s²
The Next Full CycleT = 2 s
TimeDisplacementVelocityAcceleration
1.4 s−14.27 mm−14.56 mm/s0.1408 m/s²
1.65 s−13.37 mm21.39 mm/s0.1319 m/s²
1.9 s−4.635 mm44.82 mm/s0.04575 m/s²
2.15 s6.81 mm41.99 mm/s−0.06721 m/s²
2.4 s14.27 mm14.56 mm/s−0.1408 m/s²
2.65 s13.37 mm−21.39 mm/s−0.1319 m/s²
2.9 s4.635 mm−44.82 mm/s−0.04575 m/s²
3.15 s−6.81 mm−41.99 mm/s0.06721 m/s²
3.4 s−14.27 mm−14.56 mm/s0.1408 m/s²
Displacement Graph±15 mm
+15 mm−15 mm0 s to 4 s

Two full periods of the motion. The marker sits at 1.4 s.

Moving Away From the Center
One full cycle takes 2 s. The speed peaks at 47.12 mm/s through the center, and the acceleration peaks at 0.148 m/s² at each end, where the body stops and turns.

Simple Harmonic Motion Calculator Formulas

The Simple Harmonic Motion Calculator finds where an oscillating body is at any moment. It also gives the velocity and acceleration at that moment, from the amplitude, the frequency and the starting phase.

Simple harmonic motion, or SHM, is a back-and-forth motion about a center point. The force pulling the body back is proportional to its distance from the center and always points toward the center. That one rule is the principle of SHM, and it makes the displacement a sine curve in time.

$$x = A \sin(\omega t + \phi)$$

Here x is the displacement from the center, A is the amplitude, ω is the angular frequency in rad/s, t is the time and φ is the phase constant. The angular frequency comes from the ordinary frequency as ω = 2π f.

The velocity is the rate of change of the displacement, and the acceleration is the rate of change of the velocity. Both follow from the same sine curve.

$$v = A \omega \cos(\omega t + \phi)$$

$$a = -\omega^2 x$$

The Simple Harmonic Motion Calculator opens with an amplitude of 15 mm, a frequency of 0.5 Hz and a time of 1.4 s. The angular frequency is 3.142 rad/s, and the displacement is −14.27 mm. The velocity is −14.56 mm/s and the acceleration is 0.1408 m/s², pointing back toward the center.

The amplitude of SHM is the largest distance from the center, so the body here never goes past ±15 mm. The table collects the simple harmonic motion formulas the calculator uses, with the default result for each.

QuantityFormulaDefault result
Angular frequencyω = 2π f = 2π ÷ T3.142 rad/s
PeriodT = 1 ÷ f2 s
Displacementx = A sin(ω t + φ)−14.27 mm
Velocityv = A ω cos(ω t + φ)−14.56 mm/s
Accelerationa = −ω² x0.1408 m/s²
Maximum speedv max = A ω47.12 mm/s
Maximum accelerationa max = A ω²0.148 m/s²

The maximum speed comes as the body passes the center, and the maximum acceleration comes at each end of the swing. At 1.4 s the body is moving at 30.9% of its top speed, which the first card lists as “Share of Top Speed”.

Phase Constant and the Sine or Cosine Form

The quantity ω t + φ is the phase of the motion. It grows with time and tells how far through the cycle the body is. The phase constant φ is the phase at t = 0, so it records where the body started. Older textbooks call φ the epoch, and it is also called the phase angle or initial phase.

SHM can be written with a sine or a cosine, and the two differ only by 90° of phase. With the sine form and φ = 0, the body starts at the center moving in the positive direction. With the cosine form and φ = 0, it starts at the positive end, at rest. OpenStax University Physics uses the cosine form.

The “Written As” setting in the Simple Harmonic Motion Calculator switches between the two. The same default inputs in the cosine form give −4.635 mm at 1.4 s, not −14.27 mm, so match the form to the one in your problem.

No phase constant is better than another. A value of 0 is the usual choice when the clock can be started at a convenient moment. Any other value simply shifts the whole curve along the time axis.

To calculate the phase from a real start, choose “Amplitude from the start” and enter the starting displacement and starting velocity. The Simple Harmonic Motion Calculator then works as a phase constant calculator and finds the amplitude with it.

$$A = \sqrt{x_0^2 + \left(\frac{v_0}{\omega}\right)^2}$$

$$\tan \phi = \frac{\omega x_0}{v_0}$$

The second formula is for the sine form. With the defaults of 9 mm and 75 mm/s at 0.5 Hz, the amplitude is 25.51 mm and the phase constant is 20.66°. Those two numbers and ω are the full solution of the SHM equation for that start, and every later position follows from them.

The phase difference between the three curves is fixed. Velocity leads displacement by 90°, a quarter of a cycle. Acceleration leads displacement by 180°, so it is always opposite in sign.

Time to Reach a Displacement

The time in SHM comes from turning the displacement formula around. The “Time to reach a displacement” option in the Simple Harmonic Motion Calculator gives the first moment at or after t = 0 when the body is at the position you enter.

$$t = \frac{\arcsin(x / A) – \phi}{\omega}$$

With the default 15 mm amplitude and 0.5 Hz, the body first reaches 10 mm after 232.3 ms, moving outward at 35.12 mm/s. It is at 10 mm again at 767.7 ms on the way back. A target beyond the amplitude is rejected, because the body never gets that far.

The time is not proportional to the distance. From the center to half the amplitude takes one twelfth of a period, 166.7 ms here. The second half takes twice as long, because the body slows as it nears the end.

The time period of SHM is the time for one full cycle, T = 1 ÷ f = 2π ÷ ω. The frequency of SHM is the number of cycles per second, in hertz. The third card shows the period, the angular frequency and the cycles completed, 0.7 at the default time. The Angular Frequency Calculator and the Frequency Calculator convert between these in more units.

Distance and displacement are different things in SHM. Displacement is the position measured from the center. Distance is the path covered, which is 4 A in every full cycle. At 1.4 s the default body sits at −14.27 mm but has travelled 44.27 mm. The fourth card adds that the next end of the swing is 100 ms away and the next pass through the center is 600 ms away.

Spring Motion: Mass on a Spring

Set Oscillator to “Mass on a spring” and the frequency is worked out from the spring constant k and the mass m. This is the spring motion calculator that most textbook problems need.

$$T = 2\pi \sqrt{\frac{m}{k}}$$

The default 200 N/m spring with a 0.5 kg mass has ω = √(k ÷ m) = 20 rad/s. Its period is 314.2 ms and its frequency is 3.183 Hz. Neither depends on the amplitude, so a bigger swing takes the same time.

With a 15 mm amplitude the total energy is ½ k A² = 22.5 mJ. At 1.4 s the mass is at 4.064 mm, with 20.85 mJ as kinetic energy and 1.651 mJ stored in the spring. The restoring force at that point is −0.8127 N. The spring constant itself comes from the Hooke’s Law Calculator.

A pendulum or a typed frequency has no spring constant, so the energy needs a mass. Fill the optional “Mass for Energy” field and the fourth card shows the same three rows, with a total of ½ m ω² A². A 1 kg body on the default 15 mm, 0.5 Hz motion carries 1.11 mJ. At 1.4 s that is 106 µJ of kinetic energy and 1.004 mJ of potential energy.

A textbook case makes a quick test. The OpenStax example of a 2 kg block on a 32 N/m spring with a 0.02 m amplitude gives ω = 4 rad/s and a period of 1.571 s. The maximum speed is 0.08 m/s and the maximum acceleration is 0.32 m/s². The Simple Harmonic Motion Calculator returns the same four values.

A Simple Pendulum as SHM

A pendulum on a small swing also follows simple harmonic motion. Set Oscillator to “Simple pendulum” and the frequency comes from the length L and gravity g, with ω = √(g ÷ L).

$$T = 2\pi \sqrt{\frac{L}{g}}$$

The default 0.8 m pendulum under standard gravity has a period of 1.795 s and a frequency of 0.5572 Hz. The amplitude is a distance along the arc, and the default 15 mm on a 0.8 m pendulum is a swing of 1.07°. The “Pendulum swing angle” unit takes the amplitude in degrees instead. A 10° swing on the same pendulum is an arc of 13.96 cm.

The formula holds for small swings, up to about 15° according to the OpenStax section on pendulums. Past that the Simple Harmonic Motion Calculator shows a warning with the true period. A 0.4 m arc on the same pendulum is a 28.65° swing, and the real period is 1.823 s, which is 1.585% longer.

For the energy of a swinging bob, the Kinetic Energy of a Pendulum Calculator works from the release height or angle. A swinging rod, hoop or plate is a different case, and the Physical Pendulum Calculator covers it.

Peak Velocity, Peak g and Frequency

Vibration data often comes as a peak velocity or a peak acceleration in g, not as a distance. The unit list on the Amplitude field accepts both. The amplitude then follows from A = v max ÷ ω or A = a max ÷ ω².

A peak of 1 g at 50 Hz, for example, is an amplitude of only 0.09936 mm, with a peak velocity of 31.22 mm/s. The same 1 g at 5 Hz needs 9.936 mm of travel, because the amplitude falls with the square of the frequency.

Going the other way, the second card of the Simple Harmonic Motion Calculator gives the peak acceleration in g for any amplitude and frequency. The default motion peaks at 0.0151 g. To calculate the acceleration in SHM at one moment, multiply the displacement by −ω².

The “Frequency from two peaks” option needs no frequency at all. Any two of amplitude, peak velocity and peak acceleration fix it, since ω = v max ÷ A = a max ÷ v max = √(a max ÷ A). An amplitude of 15 mm with a peak of 0.5 g gives 18.08 rad/s, which is 2.878 Hz. Two values of the same kind are rejected.

Displacement Graph and Cycle Table

The Displacement Graph panel of the Simple Harmonic Motion Calculator draws two full periods of the motion and marks the chosen time on the curve. It works as a simple harmonic motion graph generator for any amplitude, frequency and phase you enter.

“The Next Full Cycle” panel lists displacement, velocity and acceleration at steps of one eighth of a period. These are every second row for the default inputs, a quarter of a period apart.

TimeDisplacementVelocityAcceleration
1.4 s−14.27 mm−14.56 mm/s0.1408 m/s²
1.9 s−4.635 mm44.82 mm/s0.04575 m/s²
2.4 s14.27 mm14.56 mm/s−0.1408 m/s²
2.9 s4.635 mm−44.82 mm/s−0.04575 m/s²
3.4 s−14.27 mm−14.56 mm/s0.1408 m/s²

The last row repeats the first, one period later. Half a period apart, every value has the same size and the opposite sign. The tool runs in a phone browser like a simple harmonic motion calculator app, and the Copy Results, Share and Print / PDF buttons keep a record of a run.

A wave is this same motion passed along a line of points. For the displacement of a traveling wave at a position and a time, the Harmonic Wave Equation Calculator uses y(x, t). Real oscillators also lose energy on each swing, and the Damping Ratio Calculator handles that decay.

SHM Questions From Class 11 Physics

Simple harmonic motion is usually met first in school physics, and the same questions come up each year. The answers below use the standard textbook definitions.

Why is SHM called simple, and does it have another name?

It is the simplest oscillation there is. The motion has a single frequency and a single sine curve, with no other frequencies mixed in. “Harmonic” refers to that sine shape. It is also called simple harmonic oscillation, and a body that moves this way is a harmonic oscillator.

What are the two conditions for SHM?

The restoring force must be proportional to the displacement from the center, and it must point toward the center. In symbols, F = −k x. To identify simple harmonic motion, check whether the acceleration is a negative constant times the displacement. If a = −ω² x holds, the motion is SHM and the constant gives ω.

What is the difference between SHM and oscillation?

Oscillation is any motion that goes back and forth about a center. SHM is the special case where the displacement is a sine curve in time. SHM is periodic because a sine repeats every 2π of phase, so the body returns to the same position and velocity after each period. Every SHM is periodic, but a bouncing ball is periodic and is not SHM.

What are the two types of SHM?

Linear SHM is motion along a line, as with a mass on a spring. Angular SHM is a twisting motion about an axis, as with a disk hanging on a wire. There the restoring torque is proportional to the angle, τ = −κ θ, and the period is T = 2π √(I ÷ κ). The Rotational Stiffness Calculator gives κ and the natural frequency for that case.

What are three characteristics of simple harmonic motion?

Three numbers describe any SHM completely. The amplitude sets how far it swings. The frequency, or the period, sets how fast it repeats. The phase constant sets where it starts. A further property follows from the force law, which is that the period does not depend on the amplitude.

What are 10 examples of simple harmonic motion?

All of these are SHM for small motions. A mass on a spring, a simple pendulum, the prong of a tuning fork, a point on a plucked guitar string and the balance wheel of a watch are the common ones. So are a disk twisting on a wire, liquid rocking in a U-tube, a floating cylinder bobbing in water, atoms vibrating in a molecule and the charge in a circuit with a coil and a capacitor.

Is SHM in Class 11 or Class 12?

It is in Class 11. In the NCERT physics textbook, SHM is covered in Chapter 13, Oscillations, which writes the motion as x(t) = A cos(ω t + φ). Oscillations and Waves is also a unit of the JEE Main physics syllabus, so the same formulas are needed there. Choose the cosine form in the Simple Harmonic Motion Calculator to match NCERT answers.

How is SHM related to circular motion?

A point moving around a circle at steady speed, seen from the side, moves in SHM. The radius of the circle is the amplitude, and the angular speed is ω. That is why ω is measured in rad/s. The Circular Motion Calculator covers the circle itself, and more tools are on the Rotational Motion Calculators hub.