Find the pitch of a plucked, struck or bowed string from its length, tension and linear density. The simulator shows the fundamental frequency, mode shape, wavelength, period and the nearest musical note in real time — useful for everything from guitar strings to stay-cable bridge wires.
Parameters
String length L
m
Vibrating length of the string. Shorter strings sound higher.
Tension T
N
Pull on the string. Tighter strings sound higher (f scales as sqrt T).
Linear density µ
g/m
Mass per unit length. Heavier strings sound lower.
Mode number n
Number of antinodes in the standing wave. n=1 is the fundamental.
Boundary condition
How the string ends are supported
Results
—
Wave speed c (m/s)
—
Fundamental f1 (Hz)
—
Mode freq f_n (Hz)
—
Wavelength λ_n (m)
—
Period T_n (ms)
—
Nearest note
—
String animation — standing-wave mode shape
The string is clamped at the ends and vibrates in the standing-wave pattern of the selected mode n. The dashed line marks the rest position.
Mode frequency vs mode number n
Fundamental frequency vs tension T (sqrt curve)
Theory & Key Formulas
$$f_n=\frac{n}{2L}\sqrt{\frac{T}{\mu}}\ (\text{both ends fixed}),\qquad f_n=\frac{(2n-1)}{4L}\sqrt{\frac{T}{\mu}}\ (\text{one end free})$$
Mode frequency f_n. L: string length, T: tension, µ: linear density. Wave speed c = sqrt(T/µ), wavelength λ_n = c/f_n, period T_n = 1/f_n.
Tighter strings sound higher (f scales as sqrt T); longer or heavier strings sound lower (f as 1/L, 1/sqrt µ). These three levers govern the design of every stringed instrument from violins to grand pianos.
What is string vibration?
🙋
When I pluck a guitar string it sounds at a definite pitch. Why does it pick out that one frequency instead of just vibrating randomly?
🎓
Good question. A clamped string cannot vibrate at any frequency it likes. The ends have to stay still, so only standing waves whose half-wavelength fits a whole number of times along the string survive. The lowest of these is the fundamental, and that sets the pitch. Mersenne worked this out in 1636 — well before Newton wrote down the equations of motion — and stated f1 = (1/2L)*sqrt(T/µ), with L the length, T the tension and µ the linear density.
🙋
Before Newton — wild. So tuning a guitar is really about changing T, because L is fixed?
🎓
Exactly. The tuning peg changes T, and f scales as sqrt T. Multiply T by 4 and the pitch doubles, which is one octave. Pressing a fret is the other lever: it shortens the vibrating L, and f scales as 1/L, so halving the length also raises the pitch by an octave. That is why the 12th fret on a guitar sits right at the middle of the string.
🙋
Bass strings are thick because they need a big µ to sound low?
🎓
Spot on. f scales as 1/sqrt µ, so heavier strings sit lower in pitch. That is why bass guitar and double-bass strings, and the low strings of a piano, are thick and often wound with copper to add mass. The thinnest strings handle the high notes. By keeping L and T in a sensible range across the whole instrument and only varying µ, you can cover several octaves without absurd lengths or extreme tension.
🙋
When I raise the mode number n the tool jumps to "harmonics". What are those and why do strings sound so musical?
🎓
A plucked string does not vibrate purely at f1; the second harmonic (n=2), third (n=3) and so on are also present. For a both-ends-fixed string f_n = n*f1 — perfectly integer multiples — and our ears hear that integer ratio as a clean musical tone. Drums and bells have overtones that are not exact integer multiples, which is why they sound metallic. Flutes and pipe organs have integer harmonics too, so they sound musical, while a clarinet keeps only the odd harmonics, giving its distinctive hollow timbre.
🙋
Switching to "one end free" drops the pitch — is that the same reason?
🎓
Same logic. The free end now hosts an antinode, so the fundamental only fits a quarter wavelength on the string. The wavelength doubles and the frequency halves, f1 = c/(4L). The even harmonics vanish, leaving only the odd ones, exactly like a closed-open air column in a clarinet. The same maths appears in engineering: vibrating-wire sensors and some structural cantilever wires under tension behave this way.
Frequently Asked Questions
The fundamental frequency f1 of a string is given by f1 = (1/2L)*sqrt(T/µ), where L is the length, T the tension and µ the linear density (mass per unit length), for the both-ends-fixed case. Marin Mersenne stated this empirical law in 1636, decades before Newton wrote down the equations of motion. The wave speed on the string is c = sqrt(T/µ), and the fundamental mode is the standing wave whose half-wavelength exactly fits the string. This tool evaluates these expressions in real time and shows the nearest musical note as well.
The mode number n is the number of antinodes in the standing wave on the string. n=1 is the fundamental (one half-wavelength), n=2 is the second harmonic (two half-wavelengths), n=3 the third, and so on. For a both-ends-fixed string, f_n = n*f1 gives an exact integer harmonic series, which is why strings sound musically clean. Drums and most pipes (except flute-like ones) have overtones that are not integer multiples of the fundamental, giving them a more metallic or noisy timbre.
By Mersenne's law, f scales as sqrt(T), so increasing the tension raises the pitch. Once a string is mounted, its length L and linear density µ are fixed, so the only knob left during play is the tension. Multiplying T by 1.1 raises f by sqrt(1.1) ~= 1.05, roughly a semitone. Fretting a string shortens the effective L and raises the pitch through f ~ 1/L. In this tool, sweep the T slider and the fundamental-vs-tension chart traces a sqrt curve.
If one end is clamped and the other is free, the fundamental mode contains only a quarter wavelength, so f1 = c/(4L) is half of the both-ends-fixed value. In addition, only odd harmonics survive: f_n = (2n-1)*f1. This is the same maths as a clarinet (a closed-open air column) and is responsible for its hollow timbre. It also appears in vibrating-wire sensors and in cantilever wires under tension used in some structural and instrumentation problems.
Real-world applications
Stringed instrument design and tuning: Guitars, violins, pianos and harps are designed straight from Mersenne's law. The low strings of a grand piano are nearly 2 m long, thick and copper-wound (large µ), while the high strings are just a few centimetres of thin steel wire. By combining L and µ cleverly, all 88 keys (A0 = 27.5 Hz to C8 = 4186 Hz) fit within a narrow tension band of roughly 70-100 N per string. Slide the µ and L sliders here and you can feel that design space.
Stay-cable and suspension-bridge cables: Long cables on cable-stayed or suspension bridges (L of tens to hundreds of metres) carry huge tensions (hundreds of kN to a few MN) and behave as stretched strings. Wind and traffic loads excite their natural frequencies; engineers use the Mersenne formula in reverse — measuring the frequency and back-solving for T — to monitor cable tension over the life of the bridge. Dampers are then designed to avoid resonance.
Vibrating-wire sensors and viscometers: A thin tensioned wire driven electromagnetically can be used as a sensor: its resonant frequency depends on T, µ or the surrounding fluid density and viscosity. These instruments measure soil pressure on construction sites, fluid density in chemical plants, and even sit inside high-precision jeweller's balances. The principle is simple, robust and based directly on the equations in this tool.
Acoustic CAE prototyping: Before running a detailed finite-element analysis of an instrument (with body and air coupling), engineers first use a 1D string or beam model like this one to nail down the fundamental frequencies and harmonic content. If the simple model and the full simulation disagree by an order of magnitude, that is a sanity-check signal that boundary conditions or material properties are wrong in the bigger model.
Common pitfalls and pitfalls
The first trap is confusing linear density with total mass. µ is the mass per unit length (kg/m), not the mass of the entire string. The tool accepts g/m on the input and converts internally to kg/m. To measure µ on a real string, weigh it and divide by its length: a 1 m wire weighing 5 g has µ = 5 g/m = 0.005 kg/m. Plugging in the total mass instead will throw the predicted frequency off by a wide margin.
The second is treating Mersenne's law as if it were the full story. The formulas here assume a perfectly flexible string with no bending stiffness. Real strings, especially thick piano bass strings or stiff steel cables, have a small bending stiffness that pushes the higher harmonics slightly sharper than the exact integer ratio. This "inharmonicity" gives the piano its rich tone but also forces tuners to deliberately stretch the high notes sharp. For bridge cables, ignoring bending stiffness can lead to under-estimating the tension by several percent; correction formulas that include bending stiffness should be used for thick stay cables.
Finally, amplitude does not appear in the equation. Linear wave theory says the frequency is independent of how hard the string is plucked. In practice, however, a hard pluck momentarily increases the tension and bends the pitch slightly sharp for the first tens of milliseconds — guitarists know this as "attack sharpening". For strongly excited or nonlinear regimes (chaos, sub-harmonics, large-amplitude cable vibration), the simple linear theory in this tool is not enough and a nonlinear analysis is required.
How to Use
Enter string length (lNum, metres) – typical range 0.3–4.0 m for instruments.
Input tension (tNum, Newtons) – for steel strings, typically 50–500 N depending on gauge.
Specify linear mass density (muNum, kg/m) – for nylon: ~0.001 kg/m; steel: ~0.005 kg/m.
Set harmonic mode n (nNum) – n=1 for fundamental, n=2,3,4 for overtones.
Click Calculate to compute wave speed, all mode frequencies, wavelengths, periods, and nearest musical note.
Worked Example
Classical guitar high E string: length L=0.65 m, tension T=72 N, linear density μ=0.0009 kg/m. Wave speed c = √(72/0.0009) = 282.8 m/s. Fundamental f₁ = 282.8/(2×0.65) = 217.5 Hz (A3 note). For mode n=2 (first overtone): f₂ = 2×217.5 = 435 Hz (A4). Wavelength λ₂ = 282.8/435 = 0.65 m. Period T₂ = 1/435 = 2.30 ms.
Practical Notes
Validate tension using a digital tuner: if actual frequency drifts >5% from target, tension is out of spec – retension and recalibrate.
Temperature affects both tension and density; steel strings shift ~0.5 Hz/°C over typical playing ranges (20–25°C).
Nylon strings exhibit nonlinear stiffness; use effective linear density from empirical tuning tables rather than nominal density.