Complete Guide to the Simple Harmonic Motion Calculator
Simple harmonic motion (SHM) is one of the most important models in classical physics. If you study mechanics, engineering, vibration analysis, waves, or even electrical systems, you will encounter SHM repeatedly. This calculator is designed to help students, teachers, and professionals solve SHM problems quickly and accurately while also understanding what each quantity means physically.
What Is Simple Harmonic Motion?
Simple harmonic motion is a periodic motion where the restoring force is directly proportional to displacement from equilibrium and points toward equilibrium. Mathematically, this condition is written as F = -kx for a spring, where the minus sign indicates that the force acts in the opposite direction of displacement.
When this restoring-force rule holds, the object oscillates back and forth in a predictable sinusoidal pattern. The motion can be represented with cosine or sine functions, and all key variables are connected: period, frequency, angular frequency, amplitude, phase angle, velocity, and acceleration. Because the relationships are exact for ideal systems, SHM is often used as a foundational model before studying more complex oscillations with damping or external forcing.
Core SHM Formulas
1) Spring-Mass System
- Period: T = 2π√(m/k)
- Frequency: f = 1/T
- Angular frequency: ω = √(k/m) = 2πf
Here, m is mass (kg), k is spring constant (N/m), T is period (s), f is frequency (Hz), and ω is angular frequency (rad/s).
2) Simple Pendulum (Small Angle Approximation)
- Period: T = 2π√(L/g)
- Length from period: L = g(T/2π)²
Here, L is pendulum length (m), and g is gravitational acceleration (m/s²). This formula is accurate for small oscillation angles (typically less than about 10–15 degrees).
3) Position, Velocity, and Acceleration in SHM
- x(t) = A cos(ωt + φ)
- v(t) = -Aω sin(ωt + φ)
- a(t) = -ω²x(t)
A is amplitude, φ is phase constant, and t is time. Displacement and acceleration are opposite in sign relative to equilibrium position.
4) Energy in SHM
- Total energy: E = ½kA²
- Potential energy: U = ½kx²
- Kinetic energy: K = E - U = ½k(A² - x²)
In ideal SHM, total mechanical energy remains constant while kinetic and potential energies continuously exchange.
How to Use This Calculator
Choose one of the calculator modes based on what values you know and what you need to find. The calculator supports typical physics homework and lab calculations:
- Spring SHM from m and k: returns T, f, and ω.
- Spring constant from m and T: useful when period is measured experimentally.
- Mass from k and T: useful for system identification.
- Pendulum period from length: useful in timing experiments.
- Pendulum length from period: useful when designing pendulums with target period.
- State at time t: computes instantaneous x, v, a using sinusoidal motion equations.
- Energy mode: computes total, potential, and kinetic energy using amplitude and displacement.
For best results, keep units consistent. Use SI units unless you intentionally convert values before entering them.
Worked Examples
Example A: Spring period and frequency
Suppose m = 0.5 kg and k = 200 N/m. Then:
- T = 2π√(0.5/200) ≈ 0.314 s
- f = 1/T ≈ 3.18 Hz
- ω = √(200/0.5) = 20 rad/s
Example B: Find spring constant from measured period
Suppose m = 1.2 kg and measured T = 1.5 s:
- k = 4π²m/T²
- k ≈ 4π²(1.2)/(1.5²) ≈ 21.06 N/m
Example C: Pendulum length for a 2-second period
Using g = 9.81 m/s² and T = 2 s:
- L = g(T/2π)²
- L ≈ 0.994 m
This is why a “seconds pendulum” is very close to 1 meter long.
Example D: Instantaneous state in SHM
Given A = 0.1 m, ω = 8 rad/s, t = 0.2 s, φ = 30°:
- Convert φ to radians: 30° = π/6
- x = A cos(ωt + φ) = 0.1 cos(1.6 + 0.5236) ≈ -0.0525 m
- v = -Aω sin(ωt + φ) ≈ -0.681 m/s
- a = -ω²x ≈ 3.36 m/s²
Units and Conversions
Using correct units is essential in SHM calculations:
- Mass m: kilograms (kg)
- Spring constant k: newtons per meter (N/m)
- Length L and displacement x: meters (m)
- Time t and period T: seconds (s)
- Frequency f: hertz (Hz)
- Angular frequency ω: radians per second (rad/s)
- Energy E, K, U: joules (J)
If your input is in centimeters or grams, convert to meters and kilograms first. Incorrect unit conversion is one of the biggest sources of wrong answers in oscillation problems.
Common Mistakes and How to Avoid Them
- Mixing degrees and radians: trig functions in physics formulas generally expect radians. This calculator asks for phase in degrees and converts internally.
- Using large-angle pendulum data with small-angle formula: the pendulum period formula used here assumes small angles.
- Confusing frequency and angular frequency: f (Hz) and ω (rad/s) are related but not equal; ω = 2πf.
- Ignoring signs: velocity and acceleration can be positive or negative depending on phase and displacement.
- Non-physical inputs: negative mass, negative spring constant, or zero period are invalid.
Real-World Applications of SHM
Simple harmonic motion appears in far more than classroom spring examples. Engineers use SHM approximations in vibration isolation, suspension design, machinery balancing, and structural dynamics. Electronics uses SHM-style mathematics in AC circuits and signal processing. Seismology and geophysics apply oscillation models to interpret natural vibrations. Biomedical engineering uses vibration analysis in diagnostic tools and equipment design. Even timekeeping has historical roots in pendulum oscillations.
By mastering SHM formulas and calculator workflows, you build practical intuition for resonance, stability, and frequency response in real systems. That makes SHM one of the most valuable topics in introductory and intermediate physics.
Frequently Asked Questions
Is this SHM calculator free to use?
Yes. You can use this calculator freely for learning, homework checks, and quick engineering estimates.
Does this calculator include damping?
No. This page models ideal simple harmonic motion without damping or external driving force.
Why does pendulum period not depend on mass?
For an ideal simple pendulum under small-angle assumptions, mass cancels out in the equation, leaving period dependent on length and gravity only.
Can I use this for exam preparation?
Yes. It is useful for verifying calculations, practicing unit handling, and building confidence with core SHM relationships.