Harmonic Wave Equation Calculator

Use this calculator to find displacement, phase, and wave properties for a 1D harmonic wave with clear direction signs and unit-safe inputs.

Pick the most common task. Each mode shows only the inputs needed for that calculation.
For a wave moving in the +x direction, use y = A sin(kx - omega t + phi) or cosine with the same sign pattern. For a wave moving in the -x direction, use y = A sin(kx + omega t + phi).
Sine and cosine are both standard harmonic wave forms. The calculator uses the form you choose.
Maximum displacement from equilibrium. Must be nonnegative.
Distance between repeating points on the wave. Must be greater than 0.
Number of cycles per second. Must be greater than 0.
Location where you want the displacement.
Time at which you want the displacement.
Initial phase shift. Enter it in the selected phase unit.
Advanced options
Units
This selected unit applies to both position x and wavelength lambda. The label units are binding.
This selected unit applies to amplitude and displacement output y. Use the same unit for both.
The calculator converts phase internally and reports phase in the unit you choose.
Display
Auto uses standard decimals for ordinary values and scientific notation only for very large or very small values.
Used for formatted output values. Keep between 3 and 8 for classroom work.
Calculating...
Did we solve your problem today?

How to use our Harmonic Wave Equation Calculator

  1. Choose "What do you want to solve?" to match your homework problem.
  2. If you are using the wave equation, pick the "Wave direction sign in phase term" and "Wave function form" first so the sign and trig function match your equation.
  3. Enter "Amplitude (selected displacement unit)", "Position x (selected length unit)", "Time t (s)", "Wavelength lambda (selected length unit)", "Frequency f (Hz)", and "Phase constant phi" only when that mode needs them.
  4. Open "Advanced options" if you want to change the length unit, displacement unit, phase unit, number display format, or significant figures.
  5. For phase in degrees, enter "Phase constant phi" in degrees only after changing "Phase input and output unit" to degrees.
  6. Click Calculate to see the main answer plus related results such as "Wave number k", "Angular frequency omega", "Wave speed v", and "Period T" when they apply.
  7. Sanity-check the output: "Amplitude" should be nonnegative, "Wavelength lambda" and "Frequency f" should be greater than 0, and "Displacement y" should never be larger in size than the amplitude for sine or cosine waves.
  8. Read "Direction of travel" to confirm that your chosen sign means motion in +x or -x, because that is a very common source of mistakes.

Definitions

Amplitude: The maximum displacement from equilibrium in the chosen displacement unit. In the standard harmonic form, it is the coefficient A in front of sine or cosine. [1][1]

Wave direction sign: In a traveling harmonic wave, the minus sign in kx - omega t means motion in the +x direction, and the plus sign in kx + omega t means motion in the -x direction. [1]

Wave number k: A measure of how quickly the wave repeats in space, with k = 2 pi / lambda. Larger k means shorter wavelength. [1]

Angular frequency omega: A measure of how quickly the wave cycles in time. It is related to frequency by omega = 2 pi f. [1]

Phase constant phi: The starting phase shift added inside the sine or cosine. It moves the wave left or right in phase without changing amplitude.

Displacement y: The vertical value of the medium at the chosen position and time. Positive means above equilibrium, and negative means below equilibrium.

Period T: The time for one full cycle, equal to 1/f.


Common mistakes and quick fixes

Mistake: Entering a negative value for "Amplitude (selected displacement unit)".
Fix: Keep "Amplitude (selected displacement unit)" at 0 or higher. If you wanted the wave flipped, change "Phase constant phi" instead.

Mistake: Using the wrong sign in "Wave direction sign in phase term" and then wondering why the answer looks reversed.
Fix: Check "Direction of travel" after calculating. Use kx - omega t + phi for +x travel and kx + omega t + phi for -x travel.

Mistake: Typing degrees into "Phase constant phi" while "Phase input and output unit" is still set to radians.
Fix: Make "Phase input and output unit" match the way you entered "Phase constant phi" before you calculate.

Mistake: Mixing units between "Position x (selected length unit)" and "Wavelength lambda (selected length unit)".
Fix: Set "Length unit used for x and lambda" first, then enter both "Position x" and "Wavelength lambda" in that same unit.

Mistake: Expecting "Displacement y" to always be positive.
Fix: A negative "Displacement y" is valid. It means the medium is below equilibrium at that position and time.

Mistake: Entering 0 for "Frequency f (Hz)", "Wavelength lambda (selected length unit)", or "Wave speed v (selected length unit per s)" in a mode that needs them.
Fix: Use values greater than 0 for those inputs. Otherwise "Wave number k", "Angular frequency omega", "Period T", or the solved result cannot be computed.


Limitations & Key Assumptions / Boundary Conditions

  • This calculator assumes a 1D sinusoidal traveling wave and uses sine or cosine only. It does not model pulses, damping, standing waves, or non-sinusoidal shapes.
  • It treats wave speed as a positive magnitude. Travel direction is reported separately by "Direction of travel".
  • "Position x" and "Wavelength lambda" must use the same selected length unit, and "Amplitude" and "Displacement y" must use the same selected displacement unit.
  • If you choose degrees for phase, the calculator converts to radians internally before evaluating sine or cosine, then converts displayed phase back to degrees.
  • Results depend exactly on the sign convention you choose. If your class writes the equation in a different but equivalent form, rewrite it to match the selected sign pattern before comparing answers.
  • Inputs that would cause division by zero or non-finite values are not allowed. In practice, that means wavelength, frequency, and wave speed must be greater than 0 whenever a formula uses them.

Methodology

Core equations

The calculator uses the standard 1D traveling harmonic wave form. For motion in the +x direction, it uses y(x,t) = A sin(kx - omega t + phi) or y(x,t) = A cos(kx - omega t + phi). For motion in the -x direction, it uses y(x,t) = A sin(kx + omega t + phi) or y(x,t) = A cos(kx + omega t + phi). [1][1]

k = 2*pi/lambda

omega = 2*pi*f

v = f*lambda

T = 1/f

f = v/lambda

lambda = v/f

How displacement is computed

First, the calculator finds wave number k and angular frequency omega from wavelength and frequency. Next, it builds the phase angle from kx, omega t, and phi using the selected direction sign. Then it applies sine or cosine and multiplies by amplitude.

phase = k*x - omega*t + phi for +x travel

phase = k*x + omega*t + phi for -x travel

y = A*sin(phase) or A*cos(phase)

Coefficient-to-physics mode

In decode mode, the entered coefficients are treated as the standard-form inputs A, lambda, f, phi, x, and t. The calculator then returns both the displacement and the decoded properties k, omega, v, and T so you can connect equation coefficients to physical wave quantities. [2]

Worked mini-example

Suppose you use sine form, +x travel, A = 0.02 m, x = 0.5 m, t = 0.25 s, lambda = 2 m, f = 5 Hz, and phi = 0 rad.

k = 2*pi/2 = pi rad per m

omega = 2*pi*5 = 10*pi rad/s

phase = (pi)(0.5) - (10*pi)(0.25) + 0 = -2*pi

y = 0.02*sin(-2*pi) = 0

From the same inputs, the wave speed is v = f lambda = 10 m/s and the period is T = 1/5 = 0.2 s.

Units and conversions

Length units for x and lambda stay matched to the selected length unit. Displacement units for A and y stay matched to the selected displacement unit. If phase is entered in degrees, the calculator converts degrees to radians before using sine or cosine, because trig functions are evaluated internally in radians.

Assumptions behind the results

The model assumes a simple harmonic traveling wave with constant wavelength and frequency. It does not include damping, changing media, or amplitude loss. Real lab data may differ if the wave is not perfectly sinusoidal or if your class uses a different sign convention and then interprets direction differently.


Sources