Skip to content
Physics

Harmonic Wave Equation Calculator

Enter the amplitude, wavelength, frequency, phase angle, position, and time to solve the harmonic wave equation y(x, t) = A sin(kx - wt + phi). The calculator returns instantaneous displacement along with derived wave properties: wave speed, angular frequency, wavenumber, and period. A live waveform chart shows the full displacement profile across one wavelength at the chosen time.

Your details

Maximum displacement from equilibrium. Must be positive. Common units are metres (sound), pascals (pressure waves), or arbitrary units for normalised waves.
m
Distance over which the waveform repeats once (one full cycle). Together with frequency this fixes wave speed.
m
Number of complete oscillations per second. Period T = 1/f.
Hz
Initial phase offset in degrees. Use 0 for a pure sine, 90 for a cosine-like start. Positive phase shifts the wave to the left.
deg
Distance from the wave source along the direction of propagation at which displacement is evaluated.
m
Instant in time at which the displacement is evaluated. Must be zero or positive.
s
Displacement y(x, t)
2m

Instantaneous displacement of the medium at position x and time t

Wave speed (v)8m/s
Angular frequency (omega)12.5664rad/s
Wavenumber (k)1.5708rad/m
Period (T)0.5s
Phase argument-4.7124rad
Displacement (m)2
Wave speed (m/s)8
Period (s)0.5
-202048
Position x (m)
  • y(x, 0.5s)
  • +A envelope
  • -A envelope

Displacement is 2.0000 m at x = 1 m, t = 0.5 s.

  • The medium is at or very near its maximum amplitude (crest or trough).
  • Wave speed is 8.000 m/s: the disturbance travels 8.0 metres every second, completing 2.00 wavelengths per second.
  • One full oscillation takes 0.5000 s. Over 1 second there are 2 complete cycles.
  • The phase argument is near pi/2: the wave is at its positive peak.

Next stepVary the position x or time t to trace the wave in space or time. Use the waveform chart to see the full displacement profile at the chosen instant.

Formula

y(x,t)=Asin ⁣(2πλx2πft+ϕ)y(x, t) = A \sin\!\left(\frac{2\pi}{\lambda}x - 2\pi f\, t + \phi\right)

Worked example

A = 2 m, lambda = 4 m, f = 2 Hz, phi = 0 deg, x = 1 m, t = 0.5 s. k = 2*pi/4 = 1.5708 rad/m. omega = 2*pi*2 = 12.566 rad/s. v = 2*4 = 8 m/s. T = 0.5 s. Phase = 1.5708*1 - 12.566*0.5 + 0 = 1.5708 - 6.2832 = -4.7124 rad. y = 2 * sin(-4.7124) = 2 * 1.0 = 2.0 m (at the positive crest).

What is the harmonic wave equation?

A harmonic (sinusoidal) wave is the simplest oscillating disturbance that propagates through a medium at constant speed without changing shape. It describes everything from sound in air and ripples on water to electromagnetic radiation and seismic S-waves. The equation y(x, t) = A sin(kx - omega*t + phi) gives the displacement of any point in the medium at any position x and any instant t. The minus sign in front of omega*t means the pattern moves in the positive x direction; replacing it with a plus sign gives a wave moving in the negative direction. Every real wave, however complex, can be decomposed into a sum of such harmonics by Fourier analysis, which makes this single equation the foundation of all of wave physics.

How to use this calculator

Set the amplitude A (the peak displacement from rest), the wavelength lambda (the spatial repeat distance), and the frequency f (cycles per second). Leave the phase angle phi at zero for a standard sine wave, or enter a non-zero value to shift the wave left or right. Then set the position x and the time t where you want to evaluate the displacement. All six outputs update instantly: displacement, wave speed, angular frequency, wavenumber, and period. The step-by-step panel shows the full derivation with your actual numbers, and the waveform chart plots the displacement profile across two wavelengths at the chosen time so you can see where the evaluated point sits on the wave.

Wave speed, period and the dispersion relation

Wave speed v = f * lambda says that a wave moving one wavelength forward in each period covers f wavelengths per second. In a non-dispersive medium (like an ideal string or sound in a homogeneous gas at fixed temperature), v is a property of the medium and the product f * lambda is therefore fixed: increasing the frequency forces a shorter wavelength. Angular frequency omega = 2*pi*f counts the same oscillations but in radians per second instead of cycles. Wavenumber k = 2*pi/lambda does the same in space: it counts radians of phase per metre. The dispersion relation omega = v * k ties both together. Period T = 1/f is simply how many seconds one cycle takes.

Phase, phase velocity and real-world applications

The phase argument kx - omega*t + phi tells you exactly where in the cycle any point (x, t) falls. A phase of pi/2 means a crest, pi means a downward zero crossing, 3*pi/2 means a trough, and 2*pi (or 0) means an upward zero crossing. The initial phase phi shifts the whole snapshot in space: phi = pi/2 produces a cosine wave. Phase velocity is the speed at which a surface of constant phase (a crest or trough) moves: v_phase = omega/k = v. Harmonic wave calculations appear in acoustics (speaker design, room acoustics), optics (thin-film interference, diffraction gratings), seismology (earthquake wave analysis), telecommunications (carrier signal design), ultrasound imaging, and quantum mechanics (the de Broglie wave).

Harmonic wave equation - parameters and formulas

ParameterSymbolFormulaSI unit
Displacementy(x, t)A sin(kx - omega*t + phi)m
AmplitudeA(maximum displacement)m
Wavenumberk2*pi / lambdarad/m
Angular frequencyomega2*pi * frad/s
Wave speedvf * lambda = omega / km/s
PeriodT1 / fs
Wavelengthlambdav / f = 2*pi / km
Frequencyf1 / THz
Phase anglephi(initial offset)rad or deg

All six wave parameters and how they relate to each other.

Frequently asked questions

What does the phase angle phi do?

The phase angle phi shifts the entire wave pattern left or right along the x axis at the moment t = 0. With phi = 0 the equation is a sine: y starts at zero and rises. With phi = 90 degrees (pi/2 radians) it becomes a cosine: y starts at its maximum. Negative phi shifts the pattern to the right, positive phi to the left. In practice phi depends on your choice of origin: you can always define x = 0 to coincide with a zero crossing and set phi = 0, so it is a matter of convention rather than physics.

Why is the sign in kx - omega*t negative?

For the wave to travel in the positive x direction, the phase kx - omega*t must stay constant as time increases. Differentiating with respect to t gives dx/dt = omega/k = v, which is positive - meaning the pattern moves forward. Reversing to kx + omega*t gives dx/dt = -v, a wave moving in the negative x direction. Both forms are valid harmonic wave equations, just for opposite propagation directions.

What is the difference between frequency f and angular frequency omega?

Frequency f counts complete cycles per second and is measured in hertz. Angular frequency omega = 2*pi*f counts radians of phase per second. Since one full cycle equals 2*pi radians, omega is simply f scaled by 2*pi. Angular frequency is more natural in the wave equation because the argument of the sine function is in radians, so omega*t gives phase directly without a factor of 2*pi.

What is wavenumber and how does it relate to wavelength?

Wavenumber k = 2*pi/lambda is the spatial equivalent of angular frequency: it counts radians of phase per metre. Just as omega*t is the phase accumulated over time t, k*x is the phase accumulated over distance x. A large wavenumber means the wave oscillates rapidly in space (short wavelength); a small wavenumber means slow spatial oscillation (long wavelength).

Can I use this calculator for sound waves?

Yes. Sound in air at 20 degrees C travels at about 343 m/s. If you know the frequency (say 440 Hz for concert A), the wavelength is v/f = 343/440 = 0.779 m. Enter these values with x and t set to wherever and whenever you want the pressure displacement. The amplitude A would be in pascals for a pressure wave rather than metres, but the mathematics is identical.

What does displacement mean in a wave?

Displacement is how far a particle of the medium has moved from its rest (equilibrium) position. For a transverse wave on a string it is a sideways deflection in metres. For a longitudinal pressure wave (sound) it can represent the change in pressure from the ambient value. Displacement oscillates between +A and -A; the speed of the particle itself (not the wave) is the time derivative dy/dt = -A*omega*cos(kx - omega*t + phi), which is maximum at zero displacement and zero at the crests and troughs.

Sources

Written by Dr. Tomás Okafor, PhD Physicist · Lagos, Nigeria

Physicist specializing in classical mechanics, bringing 17 years of research and applied dynamics expertise to every calculator he reviews.

Search 3,500+ calculators

Loading search…