Rule of three calculator

Enter a known pair a, b and a third number c (a ≠ 0). From the direct proportion a/b = c/x you get x = (b × c) ÷ a. If 2 matches 5, then with c = 6 the result is 15. Three hours for 12 tasks give x = 20 at five hours. This is not inverse proportion (more → less) — here more → more.

Input

The currency and unit settings in the page header do not affect this result.

Result

Enter three numbers to find x.

Reducing a ratio is on ratio of two numbers. Splitting a total: divide in a ratio. GCD: GCD calculator. Guide: rule of three: how to solve proportions.

How does it work?

How 2 : 5 = 6 : x gives x = 15
a2
b5
c6
x15

The calculator uses the numbers you enter: the first number of the known pair a, the matching value b, and the third number c whose match you want. The model is the classic rule of three (direct proportion): a/b = c/x, so x = (b × c) ÷ a when a ≠ 0. When 2 matches 5 and c = 6 the result is 15, because (5 × 6) ÷ 2 = 15. Cross-multiplication check: a·x = b·c.

Mathematical model: rule of three / direct proportion with cross-multiplication. This is not reducing 12 : 8 to 3 : 2 and not splitting a ready total in ratio a : b. 3 h → 12 tasks and 5 h give x = 20, because 12 × 5 ÷ 3 = 20. 1.5 matches 6, and 4.5 matches x = 18.

The fields are First number in the proportion (a), Matches the first number (b), and Second number — find its match (c). Enter 2, 5, and 6, then Calculate. A comma and a period both parse. The first number a cannot be zero. Keep units consistent in each pair: kilograms with kilograms, hours with hours.

Reducing 12 : 8 lives on the ratio-of-two-numbers page. Splitting 100 in 3 : 2 into 60 and 40 lives on divide in a ratio. Percentage of a number (15% of 200 = 30) is a different model.

Without a, b, or c there is no result. a = 0 the calculator rejects. 4 matches 10, and 10 matches x = 25. 7 matches 21, and 2 matches x = 6. Check the 2, 5, and 6 example first.

Formula

If a matches b, and c matches x (a ≠ 0):

x = (b × c) ÷ a

Proportion form: a : b = c : x or a/b = c/x. Cross-multiplication: a · x = b · c. Model: rule of three / direct proportion.

Theory, proportion, and the rule of three

Definition

The rule of three is an algorithm for solving a direct proportion with three known numbers and one unknown. If a matches b and c matches x, you write a : b = c : x or a/b = c/x. When a ≠ 0 the unknown is x = (b × c) / a. Equivalently you cross-multiply: a · x = b · c, hence x = (b · c) / a.

Direct proportion means both quantities grow (or shrink) in the same ratio: more a → more b at a fixed quotient b/a. The scale factor k = b/a carries to the second pair: x = k · c. For a = 2, b = 5, c = 6 you get k = 2.5 and x = 15.

In teaching practice it helps to separate the mathematical formula from floating-point limits: this calculator shows the result of the calculator in the browser (floating-point arithmetic), not a symbolic paper proof. For extreme inputs, check the domain first (a ≠ 0; finite a, b, c), then floating-point range.

Historical and conceptual context

The rule of three belonged to the canon of commercial arithmetic from the Middle Ages and Renaissance: prices, exchange rates, doses, map scales, unit conversion. Euclid’s Elements develops the theory of proportion (Books V–VII): magnitudes are in the same ratio when corresponding multiples preserve inequalities. Modern fractional writing a/b = c/x and cross-multiplication became standard school tools for word problems.

Direct proportion (more → more) differs from inverse proportion (more → less, e.g. more workers → fewer days for the same job). This calculator computes direct proportion only: x = (b × c) / a. Inverse proportion needs another formula (often x = (a · b) / c) and is not implemented here.

Reducing a ratio of two integers by the GCD (12 : 8 → 3 : 2) is a separate calculator. Splitting an amount S in ratio a : b (100 → 60 and 40) is also separate. The rule of three hunts a fourth unknown from three knowns — it does not slice one sum and does not reduce a pair by GCD.

In trade and craft the same formula appears when scaling price to mass, converting work time into task count, or adjusting a recipe dose. You always need three finite numbers and a nonzero first value a.

Map-scale problems sometimes look like the rule of three when only three lengths are given and the fourth is missing. When the map scale N is already known as a single factor, a dedicated map-scale page may be clearer; this calculator stays with the three-known, one-unknown proportion layout.

Formal properties

Domain of this calculator: finite a, b, c ∈ ℝ with a ≠ 0. Result: x = (b · c) / a ∈ ℝ (finite; otherwise overflow). Homogeneity: k·a, k·b with the same c yields the same x, because b/a is unchanged. Second-pair scale: for fixed a, b the result x is linear in c.

Check identity: a · x = b · c (within floating-point tolerance). When b = 0, x = 0 for any finite c. When c = 0, x = 0. Sign of the result follows the signs of a, b, and c; the calculator does not forbid negatives beyond requiring a ≠ 0.

Role permutation: if you seek another member of the proportion, you must remap the fields so the unknown is x in the “matches c” position. The form does not guess which letter is unknown — it always computes x = (b × c) / a.

Full derivation

Step 1. Check that a, b, c are finite and a ≠ 0.

Step 2. Write the proportion a/b = c/x (when b ≠ 0) or go straight to the cross form a · x = b · c.

Step 3. Divide both sides by a: x = (b · c) / a.

Step 4. Verify a · x ≈ b · c. Scale factor: k = b/a, then x = k · c.

Example 2 matches 5, c = 6: x = (5 × 6) / 2 = 15. Example 3 h → 12 tasks, c = 5 h: x = (12 × 5) / 3 = 20.

Special cases

2 : 5 = 6 : 15; 3 : 12 = 5 : 20; 4 : 10 = 8 : 20; 1.5 : 6 = 4.5 : 18; 4 : 10 = 10 : 25; 7 : 21 = 2 : 6.

a = 0 is a domain error (division by zero). Decimals are allowed. This page does not compute inverse proportion or percentage of one number.

Numerical notes

Computation: x = (b * c) / a in floating-point arithmetic. The calculator accepts a comma or a period, and grouping spaces, depending on the page language. The product a·x may drift from b·c by machine epsilon at extreme magnitudes — the panel shows both sides of the check.

Very small |a| relative to |b·c| yields large |x|; that is a feature of the formula. The tool is educational, not a CAS and not a bookkeeping system with banker’s rounding to cents — displayed rounding comes from formatting.

When you enter values with a comma or a period, the calculator reads them the same way as the other mathematics calculators on this site. Grouping spaces are stripped before the number is read, so an entered “1 500” still reaches the same cross-multiply path as 1500.

Related notions and sources

Related: ratio of two numbers (reducing), divide in a ratio, GCD, percentage of a number, percentage change, map scale. For VAT and margin use the percentage calculators on the site.

Sources: Euclid, Elements (proportion); Wikipedia — Rule of three; MathWorld — Proportion; school arithmetic texts (word problems with proportion). Educational tool.

How to use

  1. Enter the first number of the known pair (a), for example 2.
  2. Enter the value that matches it (b), for example 5.
  3. Enter the third number (c) whose match you want, for example 6.
  4. Click Calculate. 2 : 5 = 6 : 15. Three hours and 12 tasks with c = 5 give x = 20.
  5. Check the panel: product b × c, scale b/a, and check a·x = b·c. The diagram shows the proportion.
  6. a = 0 is rejected. Reducing 12 : 8 lives on ratio of two numbers. Splitting a total lives on divide in a ratio.

Symbol glossary

If 2 matches 5, then 6 matches 15, because x = (5 × 6) ÷ 2.

a
First number of the known pair. Field “First number in the proportion”. Cannot be zero. Example: 2.
b
Value matching a. Field “Matches the first number”. Example: 5.
c
Third number — find its match x. Field “Second number — find its match”. Example: 6.
x
Missing fourth number. (5 × 6) ÷ 2 = 15. At 3 h → 12 tasks and 5 h you get x = 20.
k = b/a
Scale factor. For 2 and 5 it is 2.5, so x = 2.5 × 6 = 15.
:
Proportion writing 2 : 5 = 6 : 15. Finding a missing x, not splitting 100 in 3 : 2 into 60 and 40.

Examples

Example 1

  • 2 kg costs 5
  • How much for 6 kg? → c = 6

x = 15

What does 6 kg cost if 2 kg costs 5? 15.

Example 2

  • 3 h → 12 tasks
  • 5 h → x tasks

x = 20

How many tasks in 5 h if 3 h → 12 tasks? 20.

Example 3

  • 4 km in 10 min
  • 8 km in x min

x = 20

How many minutes for 8 km if 4 km in 10 min? 20.

Example 4

  • 1.5 matches 6
  • 4.5 matches x

x = 18

What is x when 1.5 → 6 and c = 4.5? 18.

Example 5

  • 4 : 10 = 10 : x

x = 25

What is x in 4 : 10 = 10 : x? 25.

Example 6

  • 7 matches 21
  • c = 2

x = 6

What is x when 7 → 21 and c = 2? 6.

Example 7

  • First number: 0
  • Matches: 5
  • c = 6

No result

Does a = 0 give a result? No — division by zero.

Related calculators

Frequently asked questions

What does this calculator compute?

It finds a fourth number x from the direct proportion a/b = c/x, so x = (b × c) ÷ a. When 2 matches 5 and c = 6 the result is 15. It does not reduce 12 : 8 and does not split an amount in ratio a : b.

What is the rule-of-three formula?

x = (b × c) ÷ a when a ≠ 0, from a/b = c/x. Equivalently you cross-multiply: a · x = b · c. The scale factor k = b/a gives x = k · c.

What if the first number a is zero?

There is no result. Division by zero. The first number in the known pair must be nonzero.

How is this different from reducing a 12 : 8 ratio?

There the GCD reduces the pair to 3 : 2. Here three known numbers build a fourth unknown x.

How does divide in a ratio differ?

Divide in a ratio slices one amount S by a : b (e.g. 100 → 60 and 40). The rule of three hunts x from a/b = c/x.

Do the units have to match?

In each pair, yes. Kilograms with kilograms, hours with hours. The currency and unit settings in the page header do not affect this result.

Do the currency and unit settings in the page header affect the result?

No. The result depends only on a, b, and c. The currency and unit settings in the page header do not affect this result.

Are decimal fractions allowed?

Yes. 1.5 matches 6, and 4.5 matches x = 18. A comma and a period both parse when you enter values.

What is cross-multiplication in this model?

From a/b = c/x you get a · x = b · c. Dividing by a yields x = (b × c) ÷ a. The panel shows both sides of the check.

Does the calculator compute inverse proportion?

No. Direct proportion only (more → more). Inverse proportion needs another formula and a separate tool.

Is 15% of 200 the rule of three?

No. 15% of 200 = 30 lives on the percentage-of-a-number page. Here you enter three known numbers and seek a fourth.

How do I check the result on paper?

Compute (b × c) ÷ a and compare a · x with b · c. For 2, 5, and 6: 15 and 2 × 15 = 30 = 5 × 6.

How do I calculate the rule of three?

Set a/b = c/x and compute x = (b × c) ÷ a with a ≠ 0. Example: 3 kg for 12, how much for 5 kg? a = 3, b = 12, c = 5 → x = 20. Check: a·x = b·c.

What is the direct proportion formula?

x = (b × c) / a from a/b = c/x. Same as cross-multiplying a·x = b·c. The scale factor k = b/a gives x = k·c.

How much do 12 kg cost if 5 kg cost 20?

48. Enter a = 5, b = 20, c = 12: x = (20 × 12) / 5 = 48. That is classic direct proportion (more kg → higher price).

When should I not use this calculator?

When the relation is inverse (more workers → fewer days) or nonlinear (tiers, discounts, a fixed fee). Here only direct proportion x = (b × c) / a is available.

How does the rule of three differ from a percent of a number?

A percent of a number takes one amount and a percent (e.g. 15% of 200). The rule of three seeks a fourth value from three knowns in a/b = c/x.

When 2 matches 5 and c = 6, x = 15 because (5 × 6) ÷ 2. Reducing 12 : 8 is on ratio of two numbers.

Knowledge sources

The rule-of-three and direct-proportion definition below comes from recognized sources.

Page updated November 3, 2026.