Interval between two notes calculator
This interval between two notes calculator identifies a written musical interval from two note names and their scientific pitch notation octaves.
Run — free
It reports the interval number, quality, abbreviation, direction, and semitone span. Because spelling matters in music theory, the calculator reads the letter names as well as the sounding distance: F-sharp to C is a diminished fifth, while F-sharp to B-sharp is an augmented fourth. It also handles descending and compound intervals without replacing them with simpler enharmonic names.
Enter spelled notes, not just piano keys
Choose the first and second note exactly as they appear in the music, then supply an octave for each using scientific pitch notation, where middle C is C4. You may use natural notes, sharps, flats, double sharps, or double flats. The spelling is essential because an interval has two independent dimensions: its number counts written letter positions, while its quality compares the actual semitone span with the expected span for that number. C4 to F-sharp4 and C4 to G-flat4 sound the same in equal temperament, but the first is an augmented fourth and the second is a diminished fifth. A tool that looks only at piano keys cannot preserve that distinction. The octave fields remove another ambiguity. C4 to C5 is a perfect octave, whereas C4 to C4 is a perfect unison. Entering both octaves also lets the calculator recognize direction and compound intervals instead of reducing every answer to one octave. Use the notation on the score rather than respelling a note to a more familiar enharmonic equivalent.
How quality and number are calculated
The interval number is found by counting staff letters inclusively from one note to the other. C to E includes C, D, and E, so it is some kind of third; C to F includes four letters, so it is some kind of fourth. Octave changes extend that count, producing ninths, tenths, elevenths, and other compound intervals. The calculator then finds the absolute chromatic distance in semitones, including each accidental. For unisons, fourths, fifths, and their compound equivalents, the reference quality is perfect. For seconds, thirds, sixths, sevenths, and their compounds, the wider reference is major and one semitone narrower is minor. Expanding a perfect or major reference by one semitone makes it augmented. Contracting a perfect reference by one semitone makes it diminished; contracting a minor interval by one more semitone does the same. The result therefore follows conventional written interval theory rather than choosing a label from a twelve-entry chromatic table. The semitone total is returned as supporting information, while the quality and number remain the primary answer.
Read descending and compound results correctly
Direction is based on sounding pitch after the octaves and accidentals are applied. If the second pitch is lower, the result is marked descending, but the interval name still describes the inclusive distance between the two written notes. For example, E5 down to C5 spans a minor third. Compound intervals retain their full number: C4 to E5 is a major tenth, not merely a major third, because the octave placement is part of the question. This is useful when checking vocal ranges, orchestration, counterpoint exercises, chord voicings, and transcriptions where register matters. The abbreviation combines the conventional quality symbol with the complete number, such as P5, m3, A4, or M10. Enharmonically equivalent notes can intentionally produce different names, and that is expected rather than an error. If the written staff direction and sounding direction conflict because extreme accidentals reverse the pitches, the calculator asks you to check the entry instead of returning a misleading theoretical label. API requests use the same deterministic calculation as the browser tool and cost $0.002 per request.
What you can do with it
Check theory homework
Confirm the quality and number of written intervals while keeping enharmonic spelling and octave placement intact.
Analyze a score
Identify simple or compound intervals between voices, including descending motion and altered notes.
Validate generated notation
Test whether software has spelled a pitch relationship as the intended augmented, diminished, major, minor, or perfect interval.
FAQ
Why do F-sharp and G-flat produce different interval names?
The letter names determine the interval number. Enharmonic notes can sound alike while serving different written harmonic roles.
What octave system does the calculator use?
It uses scientific pitch notation, in which middle C is C4 and the B immediately below it is B3.
Does it calculate descending intervals?
Yes. It reports descending direction when the second sounding pitch is lower and names the full interval between the spelled notes.
Can it name compound intervals?
Yes. Octave placement is retained, so C4 to E5 is returned as a tenth rather than simplified to a third.
How much does an API request cost?
Each API request costs $0.002. The browser calculator is free to use.
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-interval-between-notes \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"first_note":"F#","first_octave":4,"second_note":"C","second_octave":5}'const res = await fetch("https://api.kit.forhosting.com/hobby/music-interval-between-notes", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"first_note": "F#",
"first_octave": 4,
"second_note": "C",
"second_octave": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/hobby/music-interval-between-notes",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"first_note": "F#",
"first_octave": 4,
"second_note": "C",
"second_octave": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/hobby/music-interval-between-notes", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"first_note":"F#","first_octave":4,"second_note":"C","second_octave":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"first_note":"F#","first_octave":4,"second_note":"C","second_octave":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/hobby/music-interval-between-notes", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"first_note": "F#",
"first_octave": 4,
"second_note": "C",
"second_octave": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "hobby.music_interval_between_notes",
"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. |