Cross multiplication calculator
If 2/3 equals 4/d, then d is 6, because 2 × 6 and 3 × 4 both give 12: enter any three terms of a proportion and get the fourth, with the cross products and each step. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 2
- B
- 3
- C
- 4
- D
- 6
- Solved for
- d
- Unknown
- d
- Solution
- 6
Cross multiplication is the standard school method for solving a proportion of two equal fractions: when a over b equals c over d, the products a times d and b times c must match, so any one missing term among a, b, c, and d is isolated by a single division after that product identity. Students, tutors, and exam-prep tools need a deterministic oracle that never invents infinity when a denominator is zero and never silently accepts four filled fields as if an unknown were still open.
What cross-multiplying a/b = c/d means
A proportion states that two ratios are equal: the left fraction a divided by b equals the right fraction c divided by d. Cross-multiplying removes both denominators in one stroke by asserting that the product of the left numerator and the right denominator equals the product of the left denominator and the right numerator, written compactly as a times d equals b times c.
That identity is equivalent to the original equation whenever both denominators are non-zero, because multiplying both sides of a/b equals c/d by the product b·d cancels the denominators and yields a·d equals b·c.
Once the product form is written, solving for any single unknown is ordinary linear algebra of one equation: if a is unknown then a equals b·c divided by d; if b is unknown then b equals a·d divided by c; if c is unknown then c equals a·d divided by b; if d is unknown then d equals b·c divided by a.
Exactly three of the four terms must be known so the fourth is uniquely determined; providing all four or fewer than three is a validation error rather than a residual consistency check or a least-squares fit. Negative values are allowed because algebraic proportions are not limited to positive school examples; the signs propagate through the products and the solved term.
Teachers and automated graders care about the zero-divisor path as much as the success path: a learner who leaves d blank while setting a to zero should see a clear error naming the divisor, not a hollow success with a non-finite solution field.
Where a cross multiplication calculator earns its keep
Classrooms and tutoring platforms use a cross multiplication calculator so learners can check the missing term in a/b equals c/d without flipping product sides by hand or losing a sign. Exam-prep generators need a deterministic oracle that marks wrong the case of a zero denominator instead of silently returning an empty success or a non-finite number that a buggy grader might treat as correct.
Keep stock and working values in consistent units before you call the tool when the proportion encodes physical quantities, and convert units yourself if needed—the solver does not convert inches to centimetres or moles to grams. Prefer sending numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. Failed validation does not consume balance.
Keep requests small, pin the rounded solution and products in tests, and you get reproducible unknowns for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.
What you can do with it
Classroom and homework checks
Let students omit one of a, b, c, or d in a/b = c/d and verify the cross-multiplied unknown against textbook methods.
Scale factors and ratio notebooks
Solve map scales, recipe ratios, and similar direct proportions a/b = c/d in scripts without a full CAS library.
FAQ
How does cross multiplication solve a/b = c/d?
Cross-multiplying turns a/b = c/d into a·d = b·c.
What happens if a denominator is zero?
A zero b or d makes a fraction undefined, and a zero divisor in the rearrange is never billed.
Are negative values allowed?
Yes. Algebraic proportions may include negative terms; signs propagate through the products and the solved unknown.
Which term can be the unknown?
Any of the four. Leave the missing term empty and fill in the other three; filling all four or fewer than three is refused, since only one unknown can be found at a time.
How can I check the answer?
Multiply crosswise and compare: the two products must match. For 2/3 = 4/6, 2 × 6 and 3 × 4 both give 12, so the proportion holds.
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/cross-multiply \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":2,"left_num":-1000000000000}'const res = await fetch("https://api.kit.forhosting.com/algebra/cross-multiply", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 2,
"left_num": -1000000000000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/cross-multiply",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 2,
"left_num": -1000000000000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/cross-multiply", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":2,"left_num":-1000000000000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":2,"left_num":-1000000000000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/cross-multiply", 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": 2,
"left_num": -1000000000000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.cross_multiply",
"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
Zero denominators and zero divisors fail with invalid_input instead of a non-finite payload.
What cross-multiplying a/b = c/d means
Denominators must stay non-zero: a zero b makes a/b undefined, a zero d makes c/d undefined, and a zero divisor in the rearrange (for example d equals zero when solving for a) is rejected as invalid_input instead of returning infinity.
Input contract, response shape, and error behaviour
When a present denominator is zero, or when the rearrange would divide by a zero or near-zero divisor, the tool fails with a clear message instead of inventing infinity. POST a JSON body with exactly three of the four fields filled: a (aliases left_num, numerator_left, and num1), b (aliases left_den, denominator_left, and den1), c (aliases right_num, numerator_right, and num2), and d (aliases right_den, denominator_right, and den2). Absolute values must stay within the published limit of one trillion so intermediate products remain finite in IEEE double precision on the Worker and in the browser. Each present field may arrive as a JSON number or as a numeric string matching a strict finite pattern; non-finite values, empty strings, and values outside the absolute limit fail with invalid_input naming the field. On success the body echoes rounded a, b, c, and d; sets solved_for and unknown to the key of the omitted variable; solution to the numeric value of that unknown; equation to the filled a/b equals c/d string; cross_product to the filled a·d equals b·c string; left_product and right_product to the two sides after rounding; formula and rearrange to the algebraic form used; message to a short English summary; and steps to an ordered array of substitution lines you can assert in tests. Failed validation—wrong count of fields, missing numbers, non-finite values, values outside absolute limits, zero denominators, or a zero divisor—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item.
Where a cross multiplication calculator earns its keep
Engineering and science notebooks often reduce scale factors, map scales, recipe ratios, and similar direct proportions to a/b equals c/d; calling a tiny parse API avoids pulling a full computer-algebra system for four coefficients. When teaching, pair examples: omit d with a equals two, b equals three, and c equals four to recover six; omit a with b equals three, c equals four, and d equals six to recover two; omit b or c to practice isolating denominators and right-hand numerators; and deliberately send a zero divisor such as a equals zero when solving for d to demonstrate the hard invalid_input path.
Integration use cases
Exam and LMS auto-grading
Mark proportion items with a deterministic oracle that rejects zero denominators and zero divisors as invalid_input.
Technical questions
Which fields do I send?
Send exactly three finite numbers among a, b, c, and d (aliases for left/right numerators and denominators are accepted). Omit the unknown you want solved.
What does the cross multiplication calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.