StatGardenREF. DESK
Calculators/Physics/Simple harmonic motion
Physics

Simple harmonic motion calculator

Position, velocity and energy of a mass-spring oscillator at a given moment.

What this calculator does

Simple harmonic motion works out position, velocity and energy of a mass-spring oscillator at a given moment. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.

The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.

The formula

Formulax=A·cos(ωt); v=−Aω·sin(ωt); E = ½kA² = ½mv²+½kx², ω=√(k/m)

The inputs explained

FieldWhat to enter
Mass (kg)A number, measured in kg. Starts at 0.5.
Spring constant (N/m)A number, measured in N/m. Starts at 20.
Amplitude (m)A number, measured in m. Starts at 0.05.
Time since passing equilibrium (s)A number, measured in s. Starts at 0.1.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the answer changes with mass

Every other input is held at the calculator’s starting values while mass varies. Select any row to load that scenario into the calculator.

How the answer changes with mass
Mass (kg)Total mechanical energyPosition at tVelocity at t
0.250.025000 J0.0313 m-0.3488 m/s
0.380.025000 J0.0374 m-0.2407 m/s
0.50.025000 J0.0403 m-0.1869 m/s
0.750.025000 J0.0435 m-0.1275 m/s
10.025000 J0.0451 m-0.0967 m/s
1.50.025000 J0.0467 m-0.0652 m/s