Standing Wave Calculator – Harmonics of a String Fixed at Both Ends

Use this free Standing Wave Calculator to find the harmonic frequencies of a string fixed at both ends, such as a guitar or violin string. Enter the wave speed on the string, the string length and the harmonic number to get that harmonic's frequency and wavelength, plus the string's fundamental.

Pluck a guitar string and it does not vibrate in just any way it pleases. Because both ends are clamped still, the string can only settle into a family of very specific vibration patterns called standing waves — patterns in which some points (the nodes) never move at all, while others (the antinodes) swing through their full range. Each allowed pattern is a harmonic, and each has its own exact frequency. The lowest, the fundamental, is the pitch you name the note by; the higher harmonics stacked above it are what give the note its character and richness.

The rule behind the family is pure geometry. A string of length L can only host a standing wave if a whole number of half-wavelengths fits exactly between its fixed ends. The fundamental squeezes one half-wavelength into the string, so its wavelength is 2L. The second harmonic fits two half-wavelengths, the third fits three, and so on — which is why the harmonic frequencies form the simplest possible ladder: f1, 2f1, 3f1, 4f1… No other frequencies can survive; drive the string at anything in between and the reflections from the ends cancel the motion out instead of building it up.

Standing Wave Calculator — formula and diagram

That ladder explains a surprising amount of music. It is why a guitar and a violin playing the same written note sound different (each excites the ladder's rungs in different strengths), why pressing a fret exactly halfway along a string raises the note by precisely one octave, and why lightly touching a string at its midpoint coaxes out a flute-like tone an octave up. This calculator works the ladder for any string: give it the wave speed and length, choose a rung, and it returns the frequency and wavelength of that harmonic.

n = 1 n = 2 n = 3 one string, three of its allowed patterns

Formula

Harmonic frequency fn = n × v / (2L)  •  wavelength of the harmonic λn = 2L / n  •  the fundamental (n = 1) is f1 = v / (2L)

The two formulas are the same statement read from opposite ends. The wavelength formula is the fitting rule: the nth harmonic must pack n half-wavelengths into the length L, so each whole wavelength is 2L/n. The frequency formula then follows from the universal wave relation f = v/λ: substitute λn = 2L/n and fn = n × v/(2L) drops out. Two rearrangements are worth keeping beside them. If you know the fundamental and want any harmonic, simply multiply: fn = n × f1. And if you are designing a string for a target fundamental, the length is forced: L = v / (2f1). Frequencies are in hertz, lengths in metres and speeds in metres per second throughout.

SymbolMeaningUnits
fnfrequency of the nth harmonichertz (Hz)
nharmonic number — 1, 2, 3, … (whole numbers only)—
vspeed of waves travelling along the stringm/s
Lvibrating length of the string (nut to bridge)m
λnwavelength of the nth harmonic, 2L/nm
f1fundamental frequency — the note's pitchHz

Why only certain frequencies fit

A standing wave is not one wave but two: identical waves travelling in opposite directions along the string, passing through each other and adding their displacements at every point. Where the two always cancel, the string never moves — a node. Where they always reinforce, the string swings widest — an antinode. The fixed ends impose the strict condition that starts everything: a clamped end cannot move, so it must be a node, and the pattern must begin and end on a node. Between two nodes the smallest possible pattern is a single half-wavelength loop, so the string's length must contain 1, 2, 3… whole loops — never one and a half, because that would leave an antinode stranded at a clamped end.

This is also why a real plucked string sounds many notes at once. A pluck does not choose a single harmonic; the sharp triangular shape of a freshly plucked string can only be built by adding the fundamental and a crowd of higher harmonics together, each vibrating in its own standing pattern on the same string at the same time. The mixture — strong fundamental, moderate second and third harmonics, weaker ones above — is the instrument's timbre, its tonal fingerprint. Pluck near the middle and the even harmonics are favoured; pluck near the bridge and the sound turns bright and thin because the higher rungs of the ladder are excited more strongly. The physics on this page is, quite literally, the recipe for tone.

red = nodes (never move) green = antinodes (swing widest) the 2nd harmonic: 3 nodes, 2 antinodes

How to use

  1. Enter the speed of the wave travelling along the string in metres per second (m/s). If you know the tension and mass per unit length instead, get v from v = √(T/μ) first.
  2. Enter the vibrating length of the string in metres — for a guitar, this is the distance from the nut to the bridge; if a fret is pressed, use the shorter length from fret to bridge.
  3. Enter the harmonic number: 1 for the fundamental, 2 for the second harmonic, 3 for the third, and so on.
  4. Click "Calculate Harmonic Frequency" to get that harmonic's frequency and wavelength, together with the fundamental for reference.
  5. Repeat with different values of n to climb the whole ladder — each frequency should be an exact whole-number multiple of the fundamental.

Worked examples

Example 1 — the third harmonic. A string is 0.6 m long and waves travel along it at 120 m/s. Find the 3rd harmonic.
f3 = 3 × 120 / (2 × 0.6) = 360 / 1.2 = 300 Hz, with wavelength λ3 = 2 × 0.6 / 3 = 0.4 m. (The fundamental of this string is f1 = 120 / 1.2 = 100 Hz, and 300 Hz is exactly 3 × 100 Hz, as the ladder demands.)

Example 2 — fundamental and second harmonic. A string of length 0.5 m carries waves at 200 m/s. Its fundamental is f1 = 200 / (2 × 0.5) = 200 Hz. The second harmonic is f2 = 2 × 200 / 1.0 = 400 Hz — exactly double, one octave higher — and its wavelength is λ2 = 2 × 0.5 / 2 = 0.5 m, one full wavelength now fitting along the string.

Example 3 — fretting at the midpoint. Take the string of Example 1 (v = 120 m/s, L = 0.6 m, f1 = 100 Hz) and press it at its midpoint, as a guitarist does at the twelfth fret. The vibrating length halves to 0.3 m, so the new fundamental is f1 = 120 / (2 × 0.3) = 200 Hz. Halving the length exactly doubles every harmonic — the mathematical reason the twelfth fret sounds the octave.

Example 4 — a high harmonic's wavelength. On a string 0.8 m long with wave speed 160 m/s, the 5th harmonic has wavelength λ5 = 2 × 0.8 / 5 = 0.32 m and frequency f5 = 5 × 160 / 1.6 = 500 Hz. Five loops share the string, each loop one half-wavelength of 0.16 m.

Example 5 — designing for a target pitch. A piano maker wants a string whose fundamental is 110 Hz (the note A2), using wire on which waves travel at 352 m/s. The required length is L = v / (2f1) = 352 / 220 = 1.6 m. That single calculation is why grand pianos are long and upright pianos must cheat — winding the bass strings heavier to slow the waves, as the string tension page explains — to reach low notes in a short case.

Example 6 — touching a natural harmonic. A player lightly touches the Example 1 string exactly one third of the way along and plucks. The touch forces a node at that point, killing every harmonic that does not already have a node there; the lowest survivor is the 3rd harmonic, so the string sounds 300 Hz — a pure, flute-like tone a twelfth above the fundamental, produced without shortening the string at all.

Standing waves in real life

Guitar and violin fingering. Every fret and finger position is an application of f1 = v/(2L): shorten L and the whole ladder rises in proportion. The twelfth fret sits at exactly half the string length because halving L doubles f — the octave.

Why instruments have different sizes. A double bass needs low notes, and low notes need length: its strings are about 1.06 m long against a violin's 0.33 m. Instrument families are scaled versions of one another because the formula leaves no other honest way down.

Timbre and tone. A clarinet-like hollow tone and a bright guitar tone at the same pitch differ only in how strongly each rung of the harmonic ladder is present. Synthesisers imitate instruments by copying these harmonic recipes.

Natural harmonics in performance. String players and guitarists touch nodes at the 1/2, 1/3 and 1/4 points to sound harmonics at 2f1, 3f1 and 4f1 — bell-like tones used in everything from classical solos to rock solos.

Piano scaling. The 1.6 m answer in Example 5 is why the longest grand pianos approach 3 m and why short pianos sound tubby in the bass: their strings are too short for their pitch, so their harmonics stretch slightly out of tune with each other.

Skipping ropes and cables. The same fitting rule governs a skipping rope swung between two hands and the hum of a long cable in wind: only patterns with nodes at both ends can build up, so the visible loops are always whole numbers.

full length L — fundamental f₁ fret at midpoint: length L/2 → 2f₁

Mersenne's laws: the three knobs that set a string's pitch

The fundamental formula f1 = v/(2L) becomes far more powerful when the wave speed is written out in full. Since v = √(T/μ) for a string under tension T with mass per unit length μ, the fundamental is f1 = (1/2L) × √(T/μ) — three independent controls, summarised in the 1600s by Marin Mersenne. Length: halve L and the pitch doubles. Tension: quadruple T and the pitch doubles (it goes as the square root, which is why tuning pegs feel so sensitive near the target). Mass: quadruple μ and the pitch halves, which is why bass strings are thick or wound with extra wire. Every stringed instrument ever built is a negotiation between these three knobs and the size of the box a human can hold.

Quick reference: the harmonics of a 100 Hz string

For the string of Example 1 (L = 0.6 m, v = 120 m/s, f1 = 100 Hz), the ladder's first six rungs are:

Harmonic nFrequencyWavelength λn = 2L/nNodes (incl. ends)
1100 Hz1.2 m2
2200 Hz0.6 m3
3300 Hz0.4 m4
4400 Hz0.3 m5
5500 Hz0.24 m6
6600 Hz0.2 m7

Two patterns in the table are worth memorising: the frequencies are simply n × f1, and the node count is always n + 1, because every loop needs a node at each end and neighbouring loops share theirs.

The harmonic series is a musical scale in disguise

Climb the ladder far enough and the harmonics stop sounding like colouring and start sounding like notes in their own right. The 8th to 16th harmonics of a low fundamental trace out something close to a major scale — which is why a bugle, a tube with no valves or keys, can play real melodies: the player selects harmonics 2, 3, 4, 5 and 6 with lip tension alone, and the calls fall out of the physics. Natural trumpets and alphorns work the same way, using higher rungs still. One rung refuses to join civilisation: the 7th harmonic sits about a third of a semitone flat of the nearest piano note, which is why brass players avoid it or correct it with their lips. The ladder is nature's tuning, and equal temperament — the piano's system — is a negotiated approximation to it.

Common mistakes

  • Giving the fundamental's wavelength as L instead of 2L. Only half a wavelength fits on the string in the fundamental, so λ1 = 2L. Using L halves every frequency you calculate.
  • Counting nodes to get n. The harmonic number equals the number of loops (and antinodes), not nodes. The 3rd harmonic has 3 loops but 4 nodes — using 4 as n gives a frequency a third too high.
  • Assuming any frequency can stand. A drive at, say, 250 Hz on a string with f1 = 100 Hz matches no harmonic; the string responds weakly and untidily. Resonance only builds at the ladder's rungs.
  • Changing v when fretting. Pressing a fret changes only L. The tension and the string itself — and therefore v — are unchanged, which is exactly why the frequency scales as 1/L.
  • Using the closed-pipe formula. Strings and open pipes share fn = nv/(2L), but a closed pipe uses odd multiples of v/(4L). Feeding a string into the pipe formula quarters its fundamental.

FAQ

Why can a fixed string only vibrate at certain frequencies?
Both ends are fixed, so they must be nodes (points of no movement). Only waves that fit a whole number of half-wavelengths between the ends can form a standing wave, which gives the harmonic series fn = n × v/(2L).

What is the difference between a node and an antinode?
A node is a point that never moves; an antinode is a point that swings with maximum amplitude, halfway between two nodes. The 3rd harmonic has 4 nodes (including the ends) and 3 antinodes.

How does this explain guitar notes?
Shortening the string (pressing a fret) reduces L, which raises every harmonic frequency. Touching the string lightly at its midpoint forces a node there and sounds the 2nd harmonic, one octave up.

What exactly is a standing wave?
It is the pattern formed when two identical waves travel through each other in opposite directions — here, a wave and its own reflection from the string's ends. The pattern does not travel along the string; it stands in place, with fixed nodes and antinodes, even though the two component waves keep moving.

What happens to the harmonics if I tighten the string?
Tightening raises the tension, which raises the wave speed v = √(T/μ), and every harmonic rises in the same proportion because fn is proportional to v. Double the tension and each frequency grows by √2 ≈ 1.41 times — about a musical tritone — which is why a small peg turn makes a big difference near the target pitch.

Can the harmonic number be a fraction or a decimal?
No. The fitting rule demands a whole number of half-wavelengths between two nodes, so n = 1, 2, 3, … only. The calculator rejects non-whole values of n for exactly this reason.

Do all the harmonics sound at once on a real string?
Yes. A pluck or bow excites a mixture of many harmonics simultaneously, and the relative strength of each one is the instrument's timbre. The fundamental is usually strongest, which is why we name the pitch after it, but the overtones are what let you tell a guitar from a violin playing the same note.

How many nodes does the nth harmonic have?
Exactly n + 1, counting the two fixed ends: each of the n loops is bounded by nodes, and neighbouring loops share the node between them. Antinodes number exactly n, one at the centre of each loop.

Does a standing wave carry energy along the string?
Not on average. The two travelling waves carry equal energy in opposite directions, so the net flow cancels; energy instead sloshes back and forth between stretching (potential) and motion (kinetic) within each loop. That is why a standing wave can persist so long compared with a travelling pulse.

Why do short strings sound higher than long ones?
Because f1 = v/(2L) is inversely proportional to length: halve the string and the fundamental doubles. It is the same reason a child's small violin is tuned to the same notes as a full-size one only by using thinner, tighter strings — the length knob alone would put its pitch an octave too high.

David Okafor

David Okafor

Physics Writer · Waves & Light

David Okafor creates and reviews our waves, sound and optics calculators at CalcVIP. Every calculator is checked against hand-worked examples before it is published, so the formula, the diagram and the answer all agree.

View full profile & all calculators by Okafor →