Skip to main content

Simple Harmonic Motion Calculator

Calculate period, frequency, angular frequency, displacement, velocity, acceleration, spring constant, mass, pendulum length, and energy with SHM visuals and step-by-step solutions.

Background

Simple harmonic motion happens when a restoring force pulls an object back toward equilibrium and the motion repeats smoothly. This calculator connects formulas, phase, amplitude, energy exchange, and real systems like springs and pendulums.

Analyze simple harmonic motion

Choose a mode

Use spring SHM, pendulum SHM, snapshot motion, or energy and amplitude mode.

Solve for

Core idea

a = −ω²x; restoring acceleration points toward equilibrium.

Motion model

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

Main inputs

Used for the small-angle warning in pendulum mode.

Used mainly in energy/amplitude mode.

Snapshot / phase inputs

Use these to calculate position, velocity, acceleration, and energy split at a specific time.

SHM concept map

The motion, force, and energy all tell the same story from different angles.

At center

Speed is maximum, acceleration is zero, kinetic energy is maximum.

At amplitude

Speed is zero, acceleration is maximum inward, potential energy is maximum.

Restoring force

For springs, F = −kx. For pendulums, small-angle motion is approximately SHM.

What changes what?

A quick guide to how common variables affect SHM period in the ideal models.

Bigger mass

→ spring period increases

For springs, T = 2π√(m/k), so more mass means slower oscillation.

Stiffer spring

→ period decreases

A larger k gives a stronger restoring force and a shorter period.

Longer pendulum

→ period increases

For small swings, T = 2π√(L/g), so length matters.

Larger amplitude

→ period stays the same

In ideal SHM, amplitude does not affect period. Large pendulum angles are the exception.

Supported formats

0.5 kg20 N/m12 cm1/22.5e-3degrees or radians
  • Use positive magnitudes for mass, spring constant, length, amplitude, period, and frequency.
  • Use radians for phase unless you select degrees.
  • Simple pendulum mode assumes small angles, usually below about 10°–15°.
  • For springs, amplitude is measured from equilibrium, not from the spring’s unstretched length.

Options

Result

Copied!

No result yet. Choose a mode, enter values, then click Calculate SHM.

How to use this calculator

  • Choose the SHM mode that matches your problem: spring, pendulum, motion at time, or energy.
  • Select the quantity you want to solve for.
  • Enter known values with units, then click Calculate SHM.
  • Use the graph and mass-spring visual to connect position, velocity, acceleration, and energy.
  • Use quick examples to test common homework setups.

How this calculator works

  • For a mass-spring system, it uses T = 2π√(m/k), ω = √(k/m), and f = 1/T.
  • For a simple pendulum, it uses the small-angle approximation T = 2π√(L/g).
  • For motion at time, it uses x(t)=A cos(ωt+φ), v(t)=−Aω sin(ωt+φ), and a(t)=−ω²x.
  • For energy, it uses E = ½kA², PE = ½kx², and KE = E − PE.

Formula & Equations Used

Spring period: T = 2π√(m/k)

Pendulum period: T = 2π√(L/g)

Frequency: f = 1/T

Angular frequency: ω = 2πf

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

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

Acceleration: a(t)=−ω²x

Spring energy: E = ½kA²

Example Problems & Step-by-Step Solutions

Example 1: Find spring period

A 0.5 kg mass is attached to a 20 N/m spring.

T = 2π√(m/k)

T = 2π√(0.5/20)

T ≈ 0.993 s

Example 2: Find pendulum period

A simple pendulum has length 1.0 m near Earth.

T = 2π√(L/g)

T = 2π√(1.0/9.81)

T ≈ 2.01 s

Example 3: Find maximum spring energy

A 20 N/m spring oscillates with amplitude 0.12 m.

E = ½kA²

E = ½(20)(0.12²)

E = 0.144 J

What simple harmonic motion means

Simple harmonic motion is repeating motion caused by a restoring force or restoring acceleration that points back toward equilibrium. The object moves fastest at equilibrium and slows to zero speed at maximum displacement.

FAQ

What is the difference between period and frequency?

Period is the time for one cycle. Frequency is the number of cycles per second, so f = 1/T.

Does amplitude affect the period?

For ideal mass-spring SHM, amplitude does not affect the period. For a simple pendulum, the usual period formula assumes small angles.

Where is speed maximum in SHM?

Speed is maximum at equilibrium, where displacement is zero and kinetic energy is greatest.

Where is acceleration maximum in SHM?

Acceleration magnitude is maximum at the amplitude points, where displacement from equilibrium is largest.

Power and Root Functions -
5. BONUS: Mathematical Operations and Functions
6 problems
Topic
5. BONUS: Mathematical Operations and Functions
5 topics 13 problems
Chapter
Introduction to Units
1. Intro to Physics Units
6 problems
Topic
Patrick
Unit Conversions
1. Intro to Physics Units
6 problems
Topic
Patrick
Intro to Acceleration
2. 1D Motion / Kinematics
5 problems
Topic
Patrick
Newton's First & Second Laws
6. Intro to Forces (Dynamics)
7 problems
Topic
Patrick
Types Of Forces & Free Body Diagrams
6. Intro to Forces (Dynamics)
7 problems
Topic
Patrick
Forces & Kinematics
6. Intro to Forces (Dynamics)
6 problems
Topic
Patrick
Vertical Equilibrium & The Normal Force
6. Intro to Forces (Dynamics)
3 problems
Topic
Emilee
Intro to Springs (Hooke's Law)
7. Friction, Inclines, Systems
4 problems
Topic
Patrick
Intro to Energy & Kinetic Energy
9. Work & Energy
7 problems
Topic
Patrick
Work By Springs
9. Work & Energy
8 problems
Topic
Patrick
Work As Area Under F-x Graphs
9. Work & Energy
1 problem
Topic
David-Paige
Intro to Conservation of Energy
10. Conservation of Energy
7 problems
Topic
Kevin
Springs & Elastic Potential Energy
10. Conservation of Energy
6 problems
Topic
Emilee
Force & Potential Energy
10. Conservation of Energy
5 problems
Topic
Patrick
Spring Force (Hooke's Law)
17. Periodic Motion
7 problems
Topic
Patrick
Intro to Simple Harmonic Motion (Horizontal Springs)
17. Periodic Motion
7 problems
Topic
Patrick
Energy in Simple Harmonic Motion
17. Periodic Motion
9 problems
Topic
Patrick
Simple Harmonic Motion of Vertical Springs
17. Periodic Motion
7 problems
Topic
Patrick
Simple Harmonic Motion of Pendulums
17. Periodic Motion
7 problems
Topic
Patrick
Energy in Pendulums
17. Periodic Motion
4 problems
Topic
Patrick
Intro to Waves
18. Waves & Sound
3 problems
Topic
David-Paige
Wave Functions
18. Waves & Sound
2 problems
Topic
Jonathan
Phase Constant
18. Waves & Sound
2 problems
Topic
Patrick
1. Intro to Physics Units
6 topics 14 problems
Chapter
Patrick
2. 1D Motion / Kinematics - Part 1 of 2
7 topics 14 problems
Chapter
Patrick
2. 1D Motion / Kinematics - Part 2 of 2
5 topics 11 problems
Chapter
Patrick
3. Vectors - Part 1 of 2
4 topics 9 problems
Chapter
Patrick
3. Vectors - Part 2 of 2
4 topics 8 problems
Chapter
Patrick
6. Intro to Forces (Dynamics) - Part 1 of 2
4 topics 12 problems
Chapter
Patrick
6. Intro to Forces (Dynamics) - Part 2 of 2
5 topics 11 problems
Chapter
Patrick
7. Friction, Inclines, Systems - Part 1 of 2
4 topics 11 problems
Chapter
Patrick
7. Friction, Inclines, Systems - Part 2 of 2
4 topics 10 problems
Chapter
Patrick
9. Work & Energy - Part 1 of 2
3 topics 8 problems
Chapter
Patrick
9. Work & Energy - Part 2 of 2
4 topics 9 problems
Chapter
David-Paige
10. Conservation of Energy
7 topics 15 problems
Chapter
Patrick
17. Periodic Motion - Part 1 of 2
4 topics 10 problems
Chapter
Patrick
17. Periodic Motion - Part 2 of 2
3 topics 9 problems
Chapter
David-Paige
18. Waves & Sound - Part 1 of 3
6 topics 11 problems
Chapter
Patrick
18. Waves & Sound - Part 2 of 3
4 topics 10 problems
Chapter
Patrick
18. Waves & Sound - Part 3 of 3
5 topics 10 problems
Chapter
Patrick
Unit Converter
Quick chemistry unit conversions with accurate steps and explanations
Newton’s Second Law Calculator
Solve force, mass, and acceleration using Newton’s Second Law
Trigonometry Calculator
Calculate trig values and solve right triangles in degrees or radians
Frequency Calculator
Calculate f, T, λ, ω, and rpm ↔ Hz with smart unit conversions
Centripetal Force Calculator
Calculate centripetal force, acceleration, speed, radius, frequency, and period for circular motion
Force Calculator
Calculate net force, acceleration, equilibrium, and force components with diagrams and step-by-step solutions
Laplace Transform Calculator
Calculate Laplace transforms, inverse transforms, differential equations, and circuit responses step by step
Newton’s First Law Calculator
Resolve forces, check equilibrium, and connect ΣF = 0 with ΣF = ma
Elastic Potential Energy Calculator
Calculate spring energy using E = ½kx², plus force, displacement, and k
Velocity Calculator
Calculate velocity using average, instantaneous, acceleration, and 2D vectors
Wavelength Calculator
Calculate wavelength from frequency, speed, energy - plus inverse mode
Work–Energy Calculator
Calculate work, net work, and speed changes using work–energy
Kinetic Energy Calculator
Calculate kinetic energy, speed, and rolling motion with clear visuals
Acceleration Calculator
Calculate acceleration using velocity, time, force, and mass
Radians ↔ Degrees Converter
Convert angles between radians and degrees instantly
Free Body Diagram Generator
Build, visualize, and analyze forces with interactive free body diagrams and step-by-step explanations
Simple Pendulum Calculator
Calculate pendulum period, frequency, length, gravity, and swing motion with animated physics visuals
Spring Calculator
Solve Hooke’s law, spring work, SHM, and vertical equilibrium
Back to all calculatorsAll calculators