Common Difference Calculator
In 4, 9, 14, 19, 24 every step is 5, so the common difference is 5 and the sequence is arithmetic. Paste your terms in order to see each step, the difference and, if the rule fails, where it breaks. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Sequence
- 4, 9, 14, 19, 24
- Terms
- 4, 9, 14, 19, 24
- Differences
- 5, 5, 5, 5
- Term count
- 5
- Common difference
- 5
A common difference is the fixed amount added from one term of an arithmetic sequence to the next. This calculator reads consecutive numeric terms, subtracts each term from the one after it, and checks every resulting step. When all steps match, it returns the common difference and confirms that the sequence is arithmetic. When a step changes, it identifies the first term where the pattern breaks, making the result useful for homework checks, generated data validation, and quick inspection of increasing, decreasing, constant, decimal, or negative-valued sequences.
How to find the common difference
To find a common difference, subtract any term from the consecutive term immediately after it. For the sequence 4, 9, 14, 19, the first subtraction is 9 minus 4, which equals 5. The next two subtractions also equal 5, so the common difference is 5.
Order matters: a decreasing sequence such as 20, 16, 12, 8 has a common difference of negative 4, not positive 4, because each later term is four smaller. A constant sequence such as 7, 7, 7 has a difference of zero and is still arithmetic. This calculator performs every adjacent subtraction rather than relying on only the first and last terms.
Enter at least two consecutive terms separated by commas, spaces, semicolons, or line breaks. The result includes the normalized terms, every adjacent difference, the term count, and a direct arithmetic-sequence verdict.
How the arithmetic check detects a broken pattern
A sequence is arithmetic only when one constant difference connects every pair of consecutive terms. The calculator treats the first adjacent difference as the expected step, then compares each later difference with it. Consider 3, 8, 13, 19.
The first two steps are 5, but the final step is 6, so the sequence is not arithmetic. In that example the mismatch occurs on term 4 because the move from term 3 to term 4 breaks the established step. Two supplied terms always define one step and therefore satisfy the adjacent-difference test; add a third or later term when you need meaningful confirmation of an ongoing pattern.
The check uses the terms in the exact order provided. It does not sort values, fill missing positions, or assume that gaps represent consecutive indexes, because any of those changes would answer a different mathematical question.
What you can do with it
Check algebra homework
Confirm the signed common difference and verify that every written term follows the same arithmetic rule.
Validate generated sequences
Test output from a script or spreadsheet and locate the first term that breaks an expected constant step.
Inspect measurements with fixed increments
Check whether ordered readings, schedules, or targets advance by one consistent numerical amount.
FAQ
What is the common difference of an arithmetic sequence?
It is the signed result of subtracting one term from the consecutive term after it, and it must be identical for every adjacent pair.
Can the common difference be negative or zero?
Yes. A negative difference describes a decreasing arithmetic sequence, while zero describes a constant arithmetic sequence.
Why do two terms count as arithmetic?
Two consecutive terms create exactly one difference, so there is no second step that can contradict it. Supply at least three terms to verify a continuing pattern.
Does the calculator support decimal terms?
Yes. It accepts finite decimal values and normalizes routine floating-point noise before comparing adjacent differences.
How do I find where a sequence stops being arithmetic?
Compare every step with the first one. In 3, 8, 13, 19 the steps are 5, 5 and 6, so the pattern breaks at term 4, where the move from 13 to 19 differs.
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/algebra/arithmetic-common-difference \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"sequence":"4, 9, 14, 19, 24"}'const res = await fetch("https://api.kit.forhosting.com/algebra/arithmetic-common-difference", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"sequence": "4, 9, 14, 19, 24"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/arithmetic-common-difference",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"sequence": "4, 9, 14, 19, 24"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/arithmetic-common-difference", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"sequence":"4, 9, 14, 19, 24"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"sequence":"4, 9, 14, 19, 24"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/arithmetic-common-difference", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"sequence": "4, 9, 14, 19, 24"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.arithmetic_common_difference",
"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
How to find the common difference
That distinction catches an internal mistake that might otherwise be hidden by matching endpoints. If all adjacent differences agree, the common_difference field reports the constant step used throughout the sequence.
How the arithmetic check detects a broken pattern
The response reports is_arithmetic as false, preserves the full differences list, and points to the first affected term with mismatch_at_term. It also reports expected_difference and actual_difference so the discrepancy is immediately visible.
Inputs, decimals, limits, and interpreting results
Terms may be positive, negative, zero, or decimal finite numbers. Scientific notation such as 1e3 is accepted because it is a standard numeric representation, while fraction expressions such as 1/3 are not evaluated and should be entered as decimal values instead. Routine binary floating-point noise is normalized to stable significant digits before differences are compared, so familiar decimal progressions such as 0.1, 0.2, 0.3 are handled as people expect. The calculator accepts no more than 1,000 terms in one request, which keeps browser and API execution bounded while being ample for ordinary sequence checks. Empty input, a single term, nonnumeric text, NaN, and infinite values produce an invalid_input error instead of a misleading result. On a valid arithmetic sequence, read common_difference as the signed step: positive means increasing, negative means decreasing, and zero means constant. On a non-arithmetic sequence, inspect mismatch_at_term alongside expected_difference and actual_difference to locate the first failure, then use the complete differences array to see whether later steps fail too. Browser use is free, while each successful API request uses the published base price of $0.002.
Technical questions
What happens when the sequence is not arithmetic?
The result sets is_arithmetic to false and reports the expected step, the first mismatching step, and the affected term position.
How much does an API calculation cost?
Each successful API request costs $0.002; the same deterministic calculation is free in the browser.