Compound rule of three calculator
If 8 workers in 6 days at 5 hours a day make 240 pieces, 12 workers in 4 days at 6 hours make 288: enter the known value and each quantity, direct or inverse, and get the unknown. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Value
- 240
- Decimal places
- 6
- Factor count
- 3
- Direct count
- 3
- Inverse count
- 0
A compound rule of three problem asks for one unknown when several quantities change at once and each quantity is either directly or inversely proportional to that unknown. Students meet this model in middle-school arithmetic, vocational exams, and shop-floor planning: more workers produce more pieces (direct), but more workers finish a job in fewer days (inverse). A simple cross-multiply handles one pair; the compound form multiplies every direct ratio of sought over given and every inverse ratio of given over sought, then scales the known magnitude. This compound rule of three calculator accepts that known magnitude as value plus two or more labeled factors, each with a given value, a sought value, and a relation of direct or inverse, and returns the unknown together with the product of ratios and a filled-in setup string.
What the compound rule of three means and how mixed ratios combine
The simple rule of three is a single proportion: if four is to six as ten is to x, then x equals fifteen. The compound rule of three is the same idea with several quantities moving at once. The unknown scales with every quantity that is directly proportional to it, and it scales against every quantity that is inversely proportional to it.
Write the known magnitude of the unknown as value. For each other quantity, record its given value in the first situation, its sought value in the second situation, and whether the relation is direct or inverse. Direct means more of that quantity produces more of the unknown, so the factor is sought divided by given.
Inverse means more of that quantity produces less of the unknown, so the factor is given divided by sought. A classroom classic is eight workers in six days working five hours a day producing two hundred forty pieces; twelve workers in four days working six hours a day then produce two hundred eighty-eight pieces, because all three factors are direct: two hundred forty times twelve over eight times four over six times six over five.
Flip a relation to inverse when the story says the opposite: more machines finish the same job in fewer days, so days is inverse to machines. Zero or negative magnitudes are rejected because a ratio with a zero denominator is undefined and a negative head-count or duration is outside the usual domain of these word problems.
What to enter and what you get back
Each object needs given and sought as strictly positive finite numbers and relation as the closed enum direct or inverse so the form can render a select instead of a free-text trap. An optional name labels the row for display (workers, days, hours) but never changes the arithmetic. Optional decimals is an integer from zero to twelve and defaults to six; it rounds only the unknown, while each ratio and the product of ratios stay at twelve places for a stable contract.
Sending fewer than two factors is rejected because a single pair is a simple proportion, not a compound one. Example: value two hundred forty with workers eight to twelve direct, days six to four direct, and hours five to six direct yields unknown two hundred eighty-eight and the setup unknown equals two hundred forty times twelve over eight times four over six times six over five.
What you can do with it
Classroom and homework checks
Students enter the known magnitude plus each quantity as a direct or inverse factor and verify the unknown against the textbook product of ratios.
Workforce and production planning
Scale pieces, crew size, days, and hours together when a second shift or a smaller crew must hit a new output target.
Exam and LMS auto-grading
Mark compound-proportion items with a deterministic oracle that rejects a single factor and never flips an inverse ratio by accident.
FAQ
How do I solve a compound rule of three problem?
Send value (the known magnitude of the unknown) and at least two factors, each with given, sought, and relation set to direct or inverse.
What is the difference between a direct factor and an inverse factor?
Direct means the unknown grows with that quantity, so the factor is sought/given. Inverse means the unknown shrinks as that quantity grows, so the factor is given/sought. Workers versus pieces is usually direct; workers versus days for a fixed job is usually inverse.
Why do I need at least two factors?
One pair is a simple rule of three (a single proportion). This calculator is the compound form: several quantities at once.
What happens if a given or sought value is zero or negative?
A zero denominator would make a ratio undefined, and non-positive head-counts or durations sit outside the usual domain of these word problems. Failed validation is not billed.
How is it different from the simple rule of three?
The simple rule is one proportion: if 4 is to 6 as 10 is to x, then x is 15. The compound rule applies the same idea to several quantities changing at once, each one direct or inverse.
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/compound-rule-of-three \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":240,"factors":[{"name":"workers","given":8,"sought":12,"relation":"direct"},{"name":"days","given":6,"sought":4,"relation":"direct"},{"name":"hours","given":5,"sought":6,"relation":"direct"}]}'const res = await fetch("https://api.kit.forhosting.com/algebra/compound-rule-of-three", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 240,
"factors": [
{
"name": "workers",
"given": 8,
"sought": 12,
"relation": "direct"
},
{
"name": "days",
"given": 6,
"sought": 4,
"relation": "direct"
},
{
"name": "hours",
"given": 5,
"sought": 6,
"relation": "direct"
}
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/compound-rule-of-three",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 240,
"factors": [
{
"name": "workers",
"given": 8,
"sought": 12,
"relation": "direct"
},
{
"name": "days",
"given": 6,
"sought": 4,
"relation": "direct"
},
{
"name": "hours",
"given": 5,
"sought": 6,
"relation": "direct"
}
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/compound-rule-of-three", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":240,"factors":[{"name":"workers","given":8,"sought":12,"relation":"direct"},{"name":"days","given":6,"sought":4,"relation":"direct"},{"name":"hours","given":5,"sought":6,"relation":"direct"}]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":240,"factors":[{"name":"workers","given":8,"sought":12,"relation":"direct"},{"name":"days","given":6,"sought":4,"relation":"direct"},{"name":"hours","given":5,"sought":6,"relation":"direct"}]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/compound-rule-of-three", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 240,
"factors": [
{
"name": "workers",
"given": 8,
"sought": 12,
"relation": "direct"
},
{
"name": "days",
"given": 6,
"sought": 4,
"relation": "direct"
},
{
"name": "hours",
"given": 5,
"sought": 6,
"relation": "direct"
}
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.compound_rule_of_three",
"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.
Limits
max_items | 12 |
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 free browser path and the API share one pure module, so homework checks and automation never disagree. Failed validation is not billed; successful calls use the published $0.002 base price.
What the compound rule of three means and how mixed ratios combine
Multiply every factor and then multiply by value: that product is the unknown.
Input contract, relation flags, response shape, and errors
POST a JSON body with required value, a finite number greater than zero that is the known magnitude of the quantity you want to find, and required factors, an array of two to twelve objects. Aliases known_value, known, and result map to value; quantities and variables map to factors; precision and dp map to decimals. Sending more than twelve, a missing relation, a non-object row, or a non-positive given, sought, or value fails with invalid_input naming the field and the factor index, and those failures are not billed. On success the body echoes value, decimals, factor_count, direct_count, inverse_count, and the parsed factors with each ratio; it also returns ratio_product, the rounded unknown, a setup string that writes the product with the actual numbers, a formula restating the identity, and a short message.
Where a compound rule of three API earns its keep
Classrooms and tutoring platforms use a compound rule of three calculator so learners can check mixed direct and inverse word problems without flipping a ratio by accident. Exam generators and LMS auto-graders need a deterministic oracle that rejects a single factor, a zero given, and an unknown relation instead of inventing a product. Pin the rounded unknown and the setup string in tests, keep requests inside the twelve-factor limit, and you get reproducible homework checks, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own. Shop-floor and operations notebooks scale workforce, machine hours, and output together when planning a second shift or a smaller crew; calling a tiny parse API avoids pulling a full computer-algebra system for a handful of quotients. Pair the numeric answer with your own table of the original word problem if you need a printable worksheet; this endpoint returns numbers and display strings only.
Technical questions
What does the compound rule of three calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.