Compatible numbers
Estimate a quotient or product the way you would in your head: 417 ÷ 6.1 becomes 420 ÷ 6 = 70, shown next to the exact 68.36, so you can tell at a glance whether an answer is plausible. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 417
- B
- 6.1
- Operation
- divide
- Exact
- 68.360656
- Estimate
- 70
For division, the divisor is rounded to a friendly number and the dividend is rounded to the nearest multiple of that divisor, so the quotient comes out clean. For multiplication, both factors are rounded to one significant digit. It is the same technique taught for checking whether a calculator answer is even plausible, done in one call.
How the rounding is chosen
Each operand is rounded to one significant digit, which keeps the friendly number close to the original while staying trivially computable: 48 becomes 50, 6.1 becomes 6, and 0.038 becomes 0.04. For division there is one extra step, because a pair of friendly numbers is not automatically compatible — 417 rounded to 400 does not divide cleanly by 6. That is why the dividend is snapped to the nearest multiple of the compatible divisor instead of being rounded on its own.
This mirrors classroom practice and produces quotients with no remainder. The rounding itself uses a tiny epsilon at exact half-way boundaries, so a value like 4.5 always rounds up rather than depending on floating-point representation quirks. Negative numbers are handled by sign: the magnitude is rounded and the sign is preserved.
All output values are rounded to six decimal places, so the response is byte-for-byte stable across machines and safe to compare, cache, or snapshot in tests.
Where it fits and what it costs
Compatible-number estimation shines as a sanity check. A spreadsheet reports 68.36 for 417 ÷ 6.1; an estimate of 70 confirms the magnitude before you trust the digits downstream. It is also a teaching tool: feed a problem in and the response shows the compatible pair a student should have found, along with the formula rendered as a readable expression like 420 ÷ 6 = 70 that can be pasted straight into a worksheet.
Batch jobs can call it to flag results that drift far from their estimate before they propagate into invoices, inventory counts, or forecasts. Because it runs on our global edge, latency stays low no matter where your users are.
What you can do with it
Sanity-check a calculated result
Compare an exact quotient or product from a report against its compatible-number estimate to catch magnitude errors before they spread.
Teach estimation with live feedback
Show students which friendly numbers the algorithm picks and let them compare their own mental estimate against it.
Estimate costs and quantities on the fly
Approximate 48 items at 52 cents or 417 units across 6 batches without opening a calculator.
FAQ
Which operations are supported?
Division and multiplication, selected with the operation field. Division is the default.
How are the compatible numbers chosen?
Each number is rounded to one significant digit. For division, the dividend is additionally snapped to the nearest multiple of the compatible divisor so the quotient comes out whole.
Do I get the exact result too?
Yes. The response includes the exact quotient or product next to the estimate, so you can judge how close the estimate is.
What input is rejected?
Anything that is not a finite number, an unknown operation, and a zero divisor.
Is the estimate deterministic?
Yes. There is no randomness or time dependence, so the same two numbers always produce the same compatible pair and estimate.
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/math/compatible-numbers \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":417,"b":6.1}'const res = await fetch("https://api.kit.forhosting.com/math/compatible-numbers", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 417,
"b": 6.1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/compatible-numbers",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 417,
"b": 6.1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/compatible-numbers", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":417,"b":6.1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":417,"b":6.1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/compatible-numbers", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 417,
"b": 6.1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.compatible_numbers",
"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
The compatible numbers API takes two numbers and an operation — division or multiplication — and returns a mental-math style estimate built from friendly numbers, together with the exact result and the compatible pair it used.
What compatible numbers are and why they work
Compatible numbers are values that are easy to combine mentally because they divide or multiply cleanly, with no awkward remainders. When you see 417 ÷ 6.1, nobody computes that in their head; instead you notice that 420 sits right next to 417 and divides by 6 without a remainder, so 417 ÷ 6.1 is about 70. Multiplication is simpler: both factors are rounded independently to one significant digit, so 48 × 52 becomes 50 × 50, which anyone can compute as 2,500. The endpoint automates exactly that reasoning. It rounds the divisor to a friendly number — one significant digit — and then rounds the dividend to the nearest multiple of that divisor, guaranteeing a whole-number quotient. The response returns the compatible pair, the estimate computed from it, and the exact quotient or product, so you can see both the shortcut and the truth it was approximating in a single object. You can pass the operands under their canonical names, a and b, or under the aliases dividend, divisor, x and y.
How the rounding is chosen
Rejected inputs — non-finite numbers, unknown operations, a zero divisor — return an invalid_input error and are never charged.
Where it fits and what it costs
The same code runs free in your browser on this page, and the API costs $0.002 per request, so you only pay when you automate it. The endpoint is deterministic — no randomness, no clocks, no network calls — so identical inputs always return identical estimates, which makes it safe to cache aggressively or to embed in a pipeline that must be reproducible.
Technical questions
What does it cost?
$0.002 per request. It is also free to run in your browser on this page.