Simple Harmonic Motion Calculator
Calculate displacement, velocity, acceleration and more for SHM systems
Results
Displacement (x)
Velocity (v)
Acceleration (a)
Angular Frequency (ω)
Period (T)
Total Energy (E)
SHM Graphs
SHM Equations
Fundamental Equations of Simple Harmonic Motion
| Parameter | Equation | Description |
|---|---|---|
| Displacement | x(t) = A cos(ωt + φ) | Position at time t |
| Velocity | v(t) = -Aω sin(ωt + φ) | First derivative of displacement |
| Acceleration | a(t) = -Aω² cos(ωt + φ) | Second derivative of displacement |
| Angular Frequency | ω = 2πf = √(k/m) | Related to frequency and spring system |
| Period | T = 2π/ω = 1/f | Time for one complete oscillation |
| Total Energy | E = ½kA² | Constant total mechanical energy |
For systems where you need to analyze the restoring force directly, you might find our Hooke's Law calculator useful, as it forms the foundation for spring-based SHM.
Example Calculations
Common SHM System Examples
Example 1: Mass-Spring System
Given:
- Amplitude A = 0.1 m
- Frequency f = 5 Hz
- Phase angle φ = 0 radians
- Time t = 2 s
- Spring constant k = 100 N/m
Example 2: Simple Pendulum
Given:
- Amplitude A = 0.5 m
- Angular frequency ω = 1.4 rad/s
- Phase angle φ = π/4 radians
- Time t = 1.5 s
Example 3: Vertical Spring
Given:
- Amplitude A = 0.2 m
- Frequency f = 2 Hz
- Phase angle φ = 90°
- Time t = 0.75 s
- Spring constant k = 50 N/m
Help & Information
About Simple Harmonic Motion
Simple Harmonic Motion (SHM) is a type of periodic motion where the restoring force is directly proportional to the displacement and acts in the direction opposite to that of displacement.
Common SHM Systems
- Mass-Spring System: A mass attached to a spring that can stretch and compress
- Simple Pendulum: A weight suspended from a pivot that swings back and forth
- Torsional Pendulum: An object suspended by a wire that twists and untwists
How to Use This Calculator
- Enter the amplitude of oscillation (maximum displacement)
- Provide either angular frequency (ω) or regular frequency (f)
- Set the phase angle (starting position of the oscillation)
- Enter the time at which you want to calculate the motion parameters
- Optionally provide the spring constant to calculate total energy
- Click "Calculate" to see the results
Settings
Calculator Preferences
Physics Theory & Context
What is Simple Harmonic Motion?
Simple Harmonic Motion (SHM) is a fundamental oscillatory motion in physics where the restoring force is directly proportional to the displacement from equilibrium and acts in the opposite direction. This results in sinusoidal motion that appears in many physical systems.
Key Characteristics of SHM:
- Periodic Motion: Motion repeats at regular time intervals (period T)
- Sinusoidal Variation: Displacement follows sine or cosine function
- Constant Energy Exchange: Energy transforms between kinetic and potential forms. You can explore the energy aspects further with our elastic potential energy calculator.
- Phase Relationships: Velocity leads displacement by π/2 (90°), acceleration leads by π (180°)
Real-World Applications
- Mechanical Systems: Car suspension systems, building vibration dampers
- Timekeeping: Pendulum clocks, quartz crystal oscillators in watches
- Musical Instruments: Vibrating strings in guitars, air columns in wind instruments
- Electrical Circuits: LC circuits in radios and signal processing
- Seismology: Modeling earthquake vibrations
- Biological Systems: Heartbeat rhythms, neural oscillations
Variable Definitions and Units
| Symbol | Name | SI Unit | Physical Meaning |
|---|---|---|---|
| A | Amplitude | meter (m) | Maximum displacement from equilibrium |
| ω | Angular frequency | radian/second (rad/s) | Rate of oscillation in angular measure |
| f | Frequency | hertz (Hz) | Number of oscillations per second |
| T | Period | second (s) | Time for one complete oscillation |
| φ | Phase angle | radian (rad) | Initial position in the oscillation cycle |
| k | Spring constant | newton/meter (N/m) | Stiffness of spring (force per unit displacement) |
Step-by-Step Calculation Process
- Input Processing: Convert all inputs to SI units (meters for displacement, radians for phase angles)
- Frequency Conversion: If frequency (f) is provided, calculate angular frequency: ω = 2πf
- Phase Calculation: Compute the instantaneous phase: θ = ωt + φ
- Displacement: x = A cos(θ)
- Velocity: v = -Aω sin(θ).
- Acceleration: a = -Aω² cos(θ) = -ω²x
- Derived Quantities: Calculate period T = 2π/ω and energy E = ½kA² (if k provided)
Accuracy & Limitations
Model Assumptions and Ideal Conditions
This calculator uses the standard mathematical model for SHM, which assumes:
- Linear Restoring Force: F = -kx (Hooke's Law applies perfectly) - you can verify this with our dedicated Hooke's Law calculator.
- No Damping: Zero energy loss to friction or air resistance
- Constant Parameters: Amplitude, frequency, and phase remain constant over time
- Small Angles: For pendulum systems, sinθ ≈ θ approximation holds
- Massless Spring: Spring mass is negligible compared to attached mass
Important Limitations:
- Non-linear Systems: Real springs become non-linear at large displacements
- Damping Effects: All real oscillators experience energy dissipation
- Large Amplitudes: Pendulums with amplitudes > 15° deviate from ideal SHM
- Temperature Effects: Spring constants can change with temperature
- Mass Distribution: Assumes point mass or uniform mass distribution
Accuracy Considerations
- Numerical Precision: Calculations use JavaScript's double-precision floating-point (≈15 decimal digits)
- Rounding Behavior: Results rounded to user-specified decimal places (2 by default)
- Unit Conversions: Phase angles in degrees are converted using π/180 exact factor
- Graph Resolution: Graphs show 100 data points across two periods
Common Student Mistakes & Misconceptions
Q: Why is velocity negative when moving away from equilibrium?
A: The sign convention: positive displacement is usually defined as upward or to the right. When moving toward negative equilibrium position, velocity is negative. The negative sign in v = -Aω sin(ωt+φ) ensures correct phase relationship.
Q: What's the difference between angular frequency (ω) and frequency (f)?
A: Angular frequency (ω) measures radians per second, while frequency (f) measures cycles per second (Hz). They're related by ω = 2πf. Think of ω as "how fast" in angular terms, f as "how many times per second."
Q: Why doesn't the energy depend on time?
A: In ideal SHM, total mechanical energy (E = ½kA²) is constant. Kinetic and potential energy exchange, but their sum remains unchanged in the absence of damping. For deeper analysis of motion-related energy, explore our kinetic energy calculator.
Q: When is the phase angle not zero?
A: Phase angle φ ≠ 0 when the oscillation doesn't start at maximum displacement. For example, if you release a spring from equilibrium with an initial push, φ = π/2 (or 90°).
Educational Notes
- SHM equations use cosine by convention; sine could be used with different phase angles
- The acceleration is always opposite to displacement (a = -ω²x), confirming the restoring nature
- Maximum speed occurs at equilibrium (x=0), maximum acceleration at extremes (x=±A)
- For mass-spring systems: ω = √(k/m), so stiffer springs or lighter masses oscillate faster
- For simple pendulums (small angles): ω = √(g/L), independent of mass
Related Physics Calculators
This tool complements other physics calculators that deal with oscillatory and force-based phenomena:
- Explore wave propagation with our wave speed calculator, as waves often arise from SHM principles.
- For rotational versions of oscillatory motion, the torque calculator provides useful context.
- Damped Harmonic Oscillator: Adds exponential decay term
- Forced Oscillations: Includes external driving force
- Physical Pendulum: Accounts for mass distribution
- Coupled Oscillators: Multiple masses connected by springs
Trust & Academic Integrity Notes:
This calculator implements standard SHM equations from classical mechanics. The formulas match those found in university physics textbooks (Halliday & Resnick, Young & Freedman, Serway & Jewett). All calculations are performed client-side with transparent JavaScript code.
Last Reviewed for Formula Accuracy: May 2025
Educational Level: Suitable for high school physics, introductory college mechanics, and engineering fundamentals.
Note: This tool provides theoretical values. Real-world applications may require adjustments for damping, non-linearities, and measurement uncertainties.