String harmonic frequency calculator
A 1 m string under 100 N of tension with a linear density of 0.01 kg/m vibrates at 50 Hz in its lowest mode. Enter length, tension and mass per metre to check a sonometer lab or compare instrument strings. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Length
- 1
- Tension
- 100
- Linear density
- 0.01
- Wave speed
- 100 Hz
- Frequency
- 50
- Precision
- 10
This string harmonic frequency calculator returns the fundamental frequency of a vibrating string from its length, tension, and linear mass density using the ideal thin-string relation f one equals one over two L times the square root of T over mu. Frequency is how many cycles the string completes each second in its lowest standing-wave mode; when length is in metres, tension in newtons, and linear density in kilograms per metre, the result is exactly in hertz. A zero length is rejected because division by zero is undefined. Typical classroom checks include one metre, one hundred newtons, and zero point zero one kilograms per metre for fifty hertz, and a guitar-scale length with higher density for a mid-range pitch.
Where string fundamental calculations fit in study, lab work, and software
Students meet f one equals one over two L times the square root of T over mu when a textbook moves from standing waves to guitars, pianos, and sonometers, when a lab asks for the fundamental of a wire from measured length, hanging mass (converted to tension), and mass per length, or when a contest problem gives L, T, and mu and demands hertz without a calculator under the desk. Teachers can pre-generate answer keys for modest inputs without trusting opaque apps that silently switch units or drop scientific notation.
Developers call the same contract from scripts to seed deterministic test vectors for string simulators, to normalize user-entered length and tension before plotting spectra, or to satisfy programming-challenge statements that demand fundamental frequency rather than a hand-waved sketch. Product and education tools use the relation when a learner types metres, newtons, and kilograms per metre and the UI must show hertz with a clean formula reminder.
What you can do with it
Homework and lab checks
Convert textbook length, tension, and linear density into fundamental frequency in hertz before sonometer labs or guitar pitch comparisons.
Tutoring and education software
Normalize user-entered L, T, and μ into fundamental frequency for interactive lessons and answer keys.
FAQ
What does the string harmonic frequency calculator cost?
It is free in your browser on this page.
How is the fundamental frequency defined here?
For length L ≠ 0, tension T ≥ 0, and linear density μ > 0, f₁ = (1/(2L)) · √(T/μ). With SI inputs (m, N, kg/m) the result is in hertz (Hz).
Why are results rounded to a precision?
Default precision is 10 decimal places; you can set precision from 0 to 15.
How do I get the second or third harmonic?
Multiply the fundamental by the mode number yourself. With the 50 Hz example, the second harmonic is twice that and the third three times, because a string fixed at both ends fits whole half-wavelengths.
What raises or lowers the pitch of a string?
More tension or a lighter string raises the pitch, and a longer vibrating length lowers it. Frequency grows with the square root of tension, so quadrupling the tension only doubles the frequency.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/phys/harmonic-string \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"length":1,"tension":100,"linear_density":0.01}'const res = await fetch("https://api.kit.forhosting.com/phys/harmonic-string", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"length": 1,
"tension": 100,
"linear_density": 0.01
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/harmonic-string",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"length": 1,
"tension": 100,
"linear_density": 0.01
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/harmonic-string", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"length":1,"tension":100,"linear_density":0.01}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"length":1,"tension":100,"linear_density":0.01}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/harmonic-string", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"length": 1,
"tension": 100,
"linear_density": 0.01
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.harmonic_string",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_length | 1000000000000000 |
max_abs_tension | 1000000000000000 |
max_abs_linear_density | 1000000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What the harmonic-string relation means and what the response contains
An ideal string fixed at both ends supports standing waves whose wavelengths fit integer half-wavelengths into the free length L. The lowest mode, called the fundamental or first harmonic, has wavelength two L and frequency f one equal to wave speed over two L. The transverse wave speed on the string is the square root of tension over linear density, so the closed form is f one equals one over two L times the square root of T over mu. Physically, tighter tension or a lighter string raises the pitch; a longer vibrating segment lowers it. This calculator takes length, tension, and linear_density, validates them as finite numbers inside the documented magnitude ceilings, and returns the rounded inputs, the intermediate wave_speed, the fundamental frequency in hertz under SI assumptions, the precision used, a method tag harmonic_string_fundamental, a short formula string, and the unit label Hz. There is no approximate spectral estimation from audio, no FFT of a plucked sample, and no random sampling of periods: the engine either builds an exact floating-point quotient or rejects the input with invalid_input. Rejected cases include missing fields, non-finite values, magnitudes above the ceiling, any length that is zero or numerically zero, non-positive linear density, and negative tension. If you need higher harmonics, multiply the fundamental by the integer mode index n yourself after a successful call; if you need general wave frequency from speed and wavelength alone, use the dedicated wave-frequency tool.
How length, tension, and density are read and how f₁ stays reproducible
Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong pitch. Zero tension is valid and simply yields zero frequency and zero wave speed. Linear density must be strictly positive so the square root of T over mu is defined; negative tension is rejected as non-physical for this model. The preferred fields are length for the vibrating free length, tension for the axial force, and linear_density for mass per unit length, but aliases L, string_length, and len for length, T, force, and F for tension, and mu, density, and mass_density for linear density are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Length must be non-zero: if absolute length is at or below a tiny epsilon, the request fails with invalid_input because division by zero is not a frequency. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric fields, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the square root and division yourself.
Where string fundamental calculations fit in study, lab work, and software
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with the general wave-frequency endpoint when you already know wave speed and wavelength, and with other physics endpoints when you are building a small lab of free, deterministic calculators.
Integration use cases
Deterministic test fixtures
Generate reproducible f₁ values for unit tests, property checks, and CI assertions in string or audio simulators.
Technical questions
What happens if length is zero?
The input is rejected with invalid_input. Length = 0 makes f₁ = (1/(2L))√(T/μ) undefined (division by zero).
Does this tool return higher harmonics?
No. It only returns the fundamental f₁. Higher modes are fₙ = n · f₁ if you need them after a successful call.