String nth harmonic frequency
This string nth harmonic frequency calculator finds the frequency of any allowed mode on an ideal string fixed at both ends.
Run — free
Enter the positive harmonic number, the transverse wave speed along the string, and the vibrating length. The calculator applies f_n = nv/(2L), and also reports the mode wavelength and fundamental frequency for context. It is useful for checking laboratory measurements, planning demonstrations, studying musical-string models, and validating physics homework without first deriving the full standing-wave relationship.
Enter quantities that describe the same string
Start with the harmonic number n, which must be a positive whole number. The first harmonic is the fundamental, the second harmonic has twice the fundamental frequency, and each subsequent integer selects another fixed-end standing-wave mode. Next, enter the transverse wave speed v and the vibrating string length L. For a result in hertz, use metres per second for wave speed and metres for length. The two length units must be compatible: entering speed in centimetres per second with length in centimetres also produces cycles per second, but mixing metres per second with centimetres gives a result off by a factor of one hundred. Use the active vibrating length between the fixed endpoints, not the full manufactured length when part of the string lies beyond a bridge, clamp, or support. Wave speed should describe the same tension and linear density present during the measurement. The calculator requires positive finite values because a zero length causes division by zero, while a nonpositive wave speed does not represent a propagating transverse wave in this model.
Understand the fixed-end harmonic formula
A string fixed at both ends must have a node at each endpoint. Only standing waves that fit an integer number of half-wavelengths into the vibrating length are allowed, so L = nλ_n/2 and therefore λ_n = 2L/n. Frequency is wave speed divided by wavelength. Substituting the allowed wavelength gives f_n = v/λ_n = nv/(2L). This also shows why the harmonics are integer multiples of the fundamental frequency f_1 = v/(2L): with wave speed and length held constant, doubling n doubles frequency. The returned wavelength is the spatial period of the selected mode, while the fundamental frequency provides a useful reference for checking the answer. For example, the third harmonic must be exactly three times the reported fundamental before rounding. Precision changes only how calculated values are displayed; it does not change the physical inputs or the underlying relation. The formula assumes an ideal flexible string with uniform wave speed, small transverse displacement, and perfectly fixed endpoints, so it captures the standard textbook model rather than every detail of a real instrument or cable.
Interpret the result and its limitations
Read frequency as oscillations per second and wavelength as the repeating spatial length of the chosen standing-wave pattern. If wave speed is supplied in metres per second and length in metres, frequency and fundamental_frequency are in hertz and wavelength is in metres. Increasing harmonic number or wave speed raises the frequency proportionally; increasing string length lowers it inversely. These relationships make quick sensitivity checks straightforward. A result that does not follow them usually signals mismatched units or an incorrect vibrating length. Real strings can depart from exact integer harmonics because stiffness, nonuniform density, endpoint compliance, damping, and large-amplitude motion introduce effects outside the ideal model. Wave speed may also change when tension or linear mass density changes. If speed is not already known, determine it consistently from measurement or from an appropriate relation such as v = sqrt(T/μ), then use that value here. For automation, each API request costs $0.002; the browser calculation uses the same deterministic core. The output is intended for physical calculation and comparison, not for certifying structural, medical, or safety-critical equipment.
What you can do with it
Check a standing-wave laboratory result
Compare a measured resonance with the ideal nth-mode frequency predicted from the measured wave speed and vibrating length.
Plan a classroom demonstration
Estimate which driving frequencies should reveal selected harmonics on a fixed string before setting up the signal generator.
Validate an acoustics calculation
Confirm the harmonic frequency, fundamental reference, and wavelength produced by a spreadsheet, simulation, or homework solution.
FAQ
What formula does the calculator use?
It uses f_n = nv/(2L), where n is the positive integer harmonic number, v is wave speed, and L is the string length between fixed endpoints.
Which units should I enter?
Use metres per second for wave speed and metres for length to obtain hertz directly. Other consistent length units also work mathematically, but do not mix unit systems.
Is the first harmonic the fundamental?
Yes. Setting harmonic_number to 1 gives the fundamental frequency v/(2L); harmonic n is n times that value in the ideal model.
Can I enter a fractional harmonic number?
No. A fixed-fixed ideal string supports the indexed modes n = 1, 2, 3, and so on, so the calculator requires a positive integer.
What does the API request cost?
Each API request costs $0.002. The calculation can also run free in the browser using the same deterministic algorithm.
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/optics/string-nth-harmonic-frequency \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"harmonic_number":3,"wave_speed":120,"length":0.75}'const res = await fetch("https://api.kit.forhosting.com/optics/string-nth-harmonic-frequency", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"harmonic_number": 3,
"wave_speed": 120,
"length": 0.75
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/optics/string-nth-harmonic-frequency",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"harmonic_number": 3,
"wave_speed": 120,
"length": 0.75
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/optics/string-nth-harmonic-frequency", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"harmonic_number":3,"wave_speed":120,"length":0.75}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"harmonic_number":3,"wave_speed":120,"length":0.75}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/optics/string-nth-harmonic-frequency", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"harmonic_number": 3,
"wave_speed": 120,
"length": 0.75
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "optics.string_nth_harmonic_frequency",
"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.
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. |