Common ratio calculator
Enter two consecutive terms and get the constant multiplier of the sequence: 6 followed by 18 gives a common ratio of 3, because 18 divided by 6 is 3. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- First term
- 6
- Next term
- 18
- Common ratio
- 3
- Calculation
- common_ratio = next_term / first_term
The common ratio calculator finds the constant multiplier between two consecutive terms of a geometric sequence. Enter the earlier term and the term immediately after it, and the calculator divides the second by the first to return the common ratio. It accepts positive, negative, fractional, and zero next terms, while rejecting a zero earlier term because division by zero is undefined. The calculation is deterministic and runs without network access or stored data.
What the common ratio means
A geometric sequence changes by multiplying every term by one constant number. That number is the common ratio, usually written as r. For example, the consecutive terms 6 and 18 have a common ratio of 3 because 18 divided by 6 is 3.
The terms 20 and 5 have a ratio of 0.25, while 4 and -8 have a ratio of -2. A negative ratio makes the signs alternate as the sequence continues. A ratio between zero and one reduces the magnitude of successive terms, and a ratio whose magnitude exceeds one increases it.
This calculator returns the two normalized terms, the resulting common ratio, and a short calculation label. The pair could occur anywhere in the sequence, since the multiplier must remain constant at every step.
How to enter consecutive terms correctly
Order matters: entering 3 followed by 12 returns 4, while reversing those values returns 0.25. Both results are mathematically valid ratios, but they describe progression in opposite directions. The values must be finite real numbers, and ordinary decimal strings are accepted for form and spreadsheet integrations.
The next term may be zero. If a nonzero term is followed by zero, the ratio is zero, which means every later term generated by the same rule is also zero. The earlier term may not be zero because the formula would divide by zero.
More importantly, a pair beginning with zero does not identify one unique multiplier: zero multiplied by any finite number is still zero. For that reason, both 0 followed by 0 and 0 followed by a nonzero value are rejected rather than assigned an invented ratio. Use adjacent terms only.
Dividing terms that are two or more positions apart gives a power of the common ratio, not necessarily the ratio itself, and extracting the appropriate root can introduce multiple or non-real possibilities.
Checking a sequence and using the result
One pair is enough to compute a candidate common ratio, but a longer list is geometric only if every usable consecutive pair produces that same value. To check 2, 6, 18, and 54, calculate 6/2, 18/6, and 54/18; all three results are 3, so the sequence follows a constant multiplier. If one quotient differs, the list is not geometric as written, although rounding in measured data may explain small discrepancies.
This tool deliberately evaluates one pair at a time and does not claim that an entire sequence is geometric from a single observation. That narrow contract makes it useful in algebra exercises, answer-key generation, and software pipelines where adjacent values have already been selected. It also keeps error handling explicit: missing values, nonnumeric values, non-finite values, a zero divisor, or a ratio that overflows the finite numeric range are rejected instead of returning an ambiguous result.
No random values, current time, external service, or network response can change the quotient returned for the same input.
What you can do with it
Solve an algebra exercise
Find r directly from two adjacent terms before writing the explicit or recursive formula for a geometric sequence.
Check consecutive observations
Compare quotients from neighboring values to test whether a dataset follows a consistent multiplicative pattern.
FAQ
Why can the first term not be zero?
It is the divisor. Division by zero is undefined, and a pair starting with zero cannot determine one unique finite multiplier.
Can the next term be zero?
Yes. When a nonzero first term is followed by zero, the common ratio is zero.
Can a common ratio be negative or fractional?
Yes. Negative ratios alternate signs, and ratios with magnitude below one reduce the magnitude of successive terms.
Does one pair prove that a whole sequence is geometric?
No. One pair gives a candidate ratio. Check every consecutive pair in the sequence and confirm that all quotients agree.
Does the order of the two terms matter?
Yes. Entering 3 followed by 12 gives 4, while the reverse gives 0.25. Both are valid ratios, but they describe the sequence moving in opposite directions.
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/geometric-common-ratio \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"first_term":6,"next_term":18}'const res = await fetch("https://api.kit.forhosting.com/algebra/geometric-common-ratio", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"first_term": 6,
"next_term": 18
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/geometric-common-ratio",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"first_term": 6,
"next_term": 18
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/geometric-common-ratio", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"first_term":6,"next_term":18}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"first_term":6,"next_term":18}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/geometric-common-ratio", 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_term": 6,
"next_term": 18
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.geometric_common_ratio",
"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
Use it free in your browser for homework and quick checks, or call the API for $0.002 per successful request when you need the same calculation in software, worksheets, or automated validation.
What the common ratio means
If two consecutive terms are known, the relationship is next_term = first_term × r, so rearranging it gives r = next_term / first_term. It does not need the first term of the entire sequence: first_term simply means the earlier value in the consecutive pair you provide.
How to enter consecutive terms correctly
Put the earlier term in first_term and the immediately following term in next_term.
Checking a sequence and using the result
Browser calculations use the same pure algorithm as API calculations. The browser path is free, while an automated successful API request costs $0.002.
Integration use cases
Generate answer keys
Calculate reproducible common-ratio results for worksheets, tutoring tools, and automated assessment fixtures.
Technical questions
What formula does the calculator use?
It uses common_ratio = next_term / first_term for two terms that are consecutive and entered in sequence order.
How much does the API calculation cost?
A successful API request costs $0.002. The same deterministic calculation is free in your browser on this page.