Waves & Oscillations Calculator

Calculate wave and oscillation properties with SHM, pendulum, wave speed, Doppler effect, resonance, and beat frequency. Also: Scientific Calculator | Mechanics | Circuits.
All processing happens locally in your browser — no data uploaded.
SHM: x(t)=A cos(ωt+φ), vmax=Aω, amax=Aω², T=2π/ω.
Pendulum: T=2π√(L/g). Period independent of mass (small angle approx).
Wave Speed: v=fλ. Speed of sound ~343 m/s, light 3×10⁸ m/s.
What are waves and oscillations?

Oscillations and waves are the same underlying physics wearing different costumes. An oscillation is anything that moves back and forth around an equilibrium position — a mass on a spring, a pendulum bob, a voltage across a capacitor, the height of a guitar string, the pressure inside a sound wave. A wave is an oscillation that travels: the same back-and-forth motion, but now happening at a slightly different time at every point in space, so a snapshot shows a sinusoidal pattern that propagates. Both are governed by a single differential equation, the simple harmonic oscillator (SHM) x''(t) = -ω²x(t), whose general solution is the sinusoid x(t) = A cos(ωt + φ). From there, period T = 2π/ω, frequency f = ω/(2π), peak speed vmax = Aω, peak acceleration amax = Aω². Six panels on this page cover the canonical cases: SHM itself, the pendulum as a clock, the wave equation v = fλ for travelling waves, Doppler shift when source or observer move, LC resonance as the electrical analog of a mass on a spring, and beat frequency when two close tones interfere.

One equation, six faces: x(t) = A cos(ωt + φ) is the SHM template. Plug in the right physical variable for x (angle for a pendulum, charge for an LC circuit, pressure for sound, electric field for light) and the right ω for that system (√(g/L) for a pendulum, 1/√(LC) for an LC circuit, √(k/m) for a mass on a spring) and the same sinusoid describes all six panels here. Period, frequency, peak speed and peak acceleration are universal — only the symbol substitution changes.
Simple harmonic motion — the universal sinusoid

SHM is any motion where the restoring force (or torque, or voltage, or pressure difference) is proportional to the displacement from equilibrium. The mass on a spring is the textbook case: F = -kx produces x'' = -(k/m)x, so ω = √(k/m). The position at any time is x(t) = A cos(ωt + φ), velocity v(t) = -Aω sin(ωt + φ), acceleration a(t) = -Aω² cos(ωt + φ). With the sample (A = 0.1 m, ω = 6.28 rad/s), T = 2π/ω ≈ 1.0005 s, f = ω/(2π) ≈ 0.9995 Hz, vmax = Aω = 0.628 m/s, amax = Aω² ≈ 3.9438 m/s². If you also enter a time t, the calculator reports the instantaneous x(t), v(t), a(t) — three sinusoids 90° out of phase. SHM shows up in atomic lattices (where it models phonons), in AC circuits (where voltage and current oscillate sinusoidally at ω = 2πf), and in any small vibration around equilibrium.

The simple pendulum — a clock that needs no spring

A pendulum of length L swinging under gravity g at small angles (θ < ~15°) satisfies the SHM equation with ω = √(g/L). The period is the famous T = 2π√(L/g), which Galileo first noted is independent of the bob's mass and of how far you swing it. With L = 1 m and g = 9.81 m/s² (Earth), T ≈ 2.006 s, the canonical "seconds pendulum" that gave the metre its original definition (half-period = 1 s). On the Moon, with g = 1.62 m/s², the same 1 m pendulum takes T ≈ 4.94 s; on Mars (g = 3.72 m/s²), T ≈ 3.26 s. Above ~15° amplitude the small-angle approximation starts to drift and a correction term enters, which is why a real grandfather clock uses a long slow pendulum (low amplitude) rather than a short fast one. Bob mass cancels in √(g/L): heavy and light bobs on the same string keep identical periods.

The wave equation v = fλ — one line, three unknowns

Every travelling wave, whether sound, light, water, or seismic, obeys the same fundamental relation: v = fλ — wave speed equals frequency times wavelength. Three modes here solve for any one unknown given the other two. Sample (f = 440 Hz, λ = 0.78 m) yields v = 343.2 m/s — exactly the speed of sound in air at 20°C. Three reference speeds anchor the orders of magnitude: sound in air ~343 m/s, sound in water ~1480 m/s, light in vacuum c = 3×10⁸ m/s. To convert the wave from one medium to another you use Snell's law (covered on the optics page) for refraction, but inside a single homogeneous medium v is set by the medium's properties (density and stiffness for sound, permittivity and permeability for light).

Doppler effect — when pitch changes with motion

The Doppler effect is the change in observed frequency when source and observer move relative to each other. The classic formula is f′ = f·(v ± vo)/(v ∓ vs), where the upper sign in the numerator is taken when the observer moves toward the source (hears a higher pitch) and the lower sign in the denominator when the source moves toward the observer (still hears a higher pitch). Sample (f = 1000 Hz, v = 343 m/s, source stationary, observer moving toward source at 30 m/s): f′ = 1000·(343 + 30)/343 ≈ 1087.46 Hz, a shift of +87.46 Hz or +8.75%. The same 30 m/s source moving toward a stationary listener gives the same answer (the formula is symmetric). At high speeds the relativistic correction becomes significant; for a radar gun measuring a car at 30 m/s the γ factor differs from 1 by only ~5×10⁻¹⁷, which is why the classical formula suffices for sound but light requires the relativistic version.

LC resonance — the electrical analog of the pendulum

An LC circuit (inductor L in parallel with capacitor C) is the electrical analog of the mass-on-a-spring: charge plays the role of displacement, current the role of velocity, inductance L the role of mass, and 1/C the role of spring stiffness. Charge oscillates at ω = 1/√(LC), equivalently f = 1/(2π√(LC)). Sample (L = 100 mH, C = 10 μF) gives LC = 1×10⁻⁴, √(LC) = 1×10⁻⁷, so f ≈ 159.15 Hz with angular frequency ω ≈ 1000 rad/s and period T ≈ 6.28×10⁻⁷ s. Real LC circuits also have resistance, which causes the oscillation to decay — that decay rate is what an AM radio tuner minimizes to pick a station cleanly. Adding a driven source at exactly f forces the circuit into resonance, with voltage and current amplitudes much larger than off-resonance.

Beat frequency — two notes, one envelope

When two tones of slightly different frequencies play together, the air pressure is the sum of two sinusoids — which by trigonometry equals a cosine at the average frequency fp = (f1 + f2)/2 modulated by a slow envelope at fbeat = |f1 − f2|. The ear hears the average pitch waxing and waning at the beat rate. Sample (f1 = 440 Hz, f2 = 445 Hz) gives fbeat = 5 Hz, fp = 442.5 Hz, beat period = 0.2 s — a clearly audible pulsing 5 times per second. Below ~10 Hz the beats are heard as distinct pulses; above ~30 Hz they merge into a roughness or tremolo. Piano tuners exploit this: they strike a reference pitch and the string being adjusted, listen for beats, and tweak until the beats vanish. Once the strings are perfectly in tune fbeat = 0 and the calculator reports "Identical frequencies — no beats".

Common misconceptions
  • Period and frequency are not the same. T (seconds per cycle) and f (cycles per second) are reciprocals. T = 1/f. A 0.5 Hz oscillation takes 2 seconds to complete one cycle.
  • Pendulum period depends on amplitude only weakly. The exact period for finite amplitude θ0 is T = T0·(1 + θ0²/16 + πθ0⁶/…). For 15° this is a 0.7% correction, for 30° about 1.7% — usually ignored in introductory problems.
  • The Doppler shift is the same for source or observer moving. Whether the source moves toward a stationary observer or the observer moves toward a stationary source at the same speed, the pitch shift is identical (non-relativistically).
  • Resonance is not the same as maximum amplitude. Resonance is the condition ωdrive = ωnatural. With damping, peak amplitude is below the undamped value; with no damping, amplitude grows without bound (limited only by nonlinearity).

Related tools: Modern Physics for de Broglie waves & the wave-particle duality, Electricity & Circuits for AC analysis where LC resonance sits, and Optics & Light for electromagnetic waves.