Tuning error in cents calculator
Playing 442 Hz against a 440 Hz target is just under eight cents sharp: enter the frequency you hear and the one you want, and get the signed error in cents and whether to raise or lower the pitch. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Played
- 442
- Target
- 440
- Error cents
- 7.8514150401 cents
- Abs error cents
- 7.8514150401
- Direction
- sharp
- Ratio
- 1.0045454545
When you tune a guitar, piano, violin, flute, or synthesizer, the useful question is rarely only “what note am I near?” — it is how many cents sharp or flat the sounding pitch sits relative to the frequency you meant to hit. This tuning error in cents calculator accepts a played frequency and a target frequency in hertz, applies the standard logarithmic pitch formula of twelve hundred times the base-two log of the ratio played over target, and returns a signed error in cents plus a plain-language direction: sharp, flat, or in tune. One equal-tempered semitone is one hundred cents and one octave is twelve hundred, so a few cents of error is a fine-tuning nudge while tens of cents is a clearly audible miss.
What tuning error in cents means for fine pitch work
Cents are the unit musicians use for small pitch differences that live between equal-tempered semitones. If the result is positive, the instrument is sounding sharp — higher than the target — and you lower the string, slide, embouchure, or oscillator. If negative, the pitch is flat and you raise it.
Zero means the played frequency matches the target within floating-point rounding. Because the scale is logarithmic, the same cent error is the same musical distance at every register: five cents sharp on a low E and five cents sharp on a high A feel comparable as detuning, even though the absolute hertz difference is much larger on the high note. That property is why professional tuners, strobe apps, and studio meters report cents rather than raw hertz when guiding fine adjustment.
This capability does not snap to a nearest note name; you already know the target pitch (for example A4 at four hundred forty hertz, or a custom reference for historical or ensemble pitch) and you only need the signed miss. Pair it with a frequency-to-note tool when you still need to identify which note you are near, then use this calculator once the target is fixed and you are dialing in the last few cents.
What you can do with it
Guitar, piano, and string setup
Compare each open string or unisons to a target frequency and read signed cents error so you know whether to tighten or loosen and by how much.
Practice apps and classroom tuners
After a pitch detector reports played hertz, compute sharp/flat cents against the lesson’s target note for clear fine-tuning feedback.
Studio and synth calibration scripts
Assert oscillator or monitor-tone outputs stay within a cents tolerance of programmed targets in CI and session setup checklists.
FAQ
How do I calculate tuning error in cents?
Send positive finite numbers played and target in hertz.
What does a positive or negative error mean?
Negative means flat (too low); raise the pitch. Zero means in tune.
How many cents are in a semitone or octave?
One equal-tempered semitone is 100 cents; one octave (frequency ratio 2:1) is 1200 cents. Small single-digit cent errors are fine-tuning; larger values are clearly audible.
What if played or target is zero or negative?
Frequencies must be strictly positive; invalid input is not billed.
How far off is 442 Hz from a 440 Hz target?
It is sharp by just under eight cents, a small fine-tuning nudge rather than a clearly audible miss. Lower the string, slide or oscillator slightly until the error reaches zero.
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/hobby/music-tuning-error-cents \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"played":442,"target":440}'const res = await fetch("https://api.kit.forhosting.com/hobby/music-tuning-error-cents", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"played": 442,
"target": 440
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/hobby/music-tuning-error-cents",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"played": 442,
"target": 440
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/hobby/music-tuning-error-cents", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"played":442,"target":440}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"played":442,"target":440}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/hobby/music-tuning-error-cents", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"played": 442,
"target": 440
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "hobby.music_tuning_error_cents",
"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. |
Technical notes
Invalid or non-positive frequencies fail with invalid_input and are not billed.
What tuning error in cents means for fine pitch work
By definition, the interval between two positive frequencies f_high and f_low is twelve hundred times log base two of their ratio; applied to tuning, the error is twelve hundred times log2 of played divided by target.
Input contract, response fields, and error behaviour
Example: played four hundred forty-two hertz against target four hundred forty yields a small positive error of roughly seven point eight five cents — sharp — so you ease the pitch down. Example: played four hundred thirty-eight against four hundred forty yields a small negative error — flat — so you raise the pitch. Keep both values in the same unit (hertz) and within the declared magnitude limits so the ratio stays finite and positive. POST a JSON body with two required strictly positive finite numbers: played, the observed sounding frequency in hertz, and target, the intended pitch in hertz. Aliases such as played_hz, observed, actual, or measured map to played; target_hz, intended, desired, or reference map to target. Each field may arrive as a JSON number or as a numeric string; missing fields, empty strings, non-finite values, and zero or negative frequencies fail with invalid_input naming the problem, and those failures do not consume balance. On success the body echoes played and target with stable twelve-decimal rounding, error_cents as the signed tuning error, abs_error_cents as its absolute value, direction as sharp, flat, or in_tune, ratio as played over target, unit set to cents, a formula string restating the log2 identity, a human-readable message that tells you whether to raise or lower the pitch, and a steps array that shows the arithmetic for teaching or debugging. Equal frequencies return zero cents and direction in_tune.
Where a tuning-error API earns its keep
Instrument technicians and luthiers log open-string and stop positions as frequency pairs and need a deterministic cents error for setup notes and QC checklists. Ensemble managers who set a house pitch other than four hundred forty hertz (for example four hundred forty-two for bright orchestras, or lower for period performance) plug that value as target and measure each section’s drift without converting to note names first. Synth and modular patch designers compare oscillator readouts to programmed targets in automation scripts so detune offsets stay honest across firmware and host sample rates. Music educators and practice apps show learners a live sharp or flat cue after a microphone or pitch detector reports hertz; calling a tiny parse endpoint avoids re-implementing log2 cents in every client language. Pin the rounded error_cents field in tests, reject non-positive frequencies early, and you get reproducible fine-tuning guidance for classrooms, repair shops, and edge workers without standing up a full music-analysis stack of your own.
Technical questions
What does the tuning error in cents calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.