Ratio Calculator
Simplify, scale, split and compare exact ratios, solve proportions, and convert parts to percentages. See formulas, input limits, worked steps and exports.
Enter values to calculate.
Trust summary CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance · all published modes
- Input interpretation
- Enter values to calculate.
- Result
- —
- Verified scope
- all published modes
- Assurance
- Core
- Declared partition coverage
- PASS · 8/8 declared partitions (simplify, proportion, scale, split, compare, convert, three-term, invalid-domain) · Matrix
- Numerical scope
- All six published Ratio modes (simplify, proportion, scale, split, compare, convert), including A:B:C where those modes support it. Independent O2 expected values; exact rational BigInt; Node is runtime host only.
- Known limitations
- Core CVP does not include live graph, viewport, or pointer interaction.
- Model
- Simplify, scale, and compare ratios; solve proportions; split a total; convert to fraction/decimal/percent.
- Scope
- Finite rationals: integers, terminating decimals, or simple fractions a/b.
- Verification
- Engine tested · Source checked · v1.0.3 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance · all published modes· View Manifest · CVP overview · Specification
- Versions
- Calculation 1.0.3 · CVP protocol 1.0.0-proposed · Evidence 2026-10-21.ratio-complete-contract-v3
- Verification revision
- 2026-10-21.ratio-complete-contract-v3 · 7/7 property · digest 980fb61ebf20
- Legacy regression
- 26/26 tests · Production surface contract 10/10
- Trust layers
- Verification VERIFIED · Production CURRENT · Overall CVP state: VERIFIED under CVP 1.0.0-proposed
- Reference
- O1 model · O2 expected_values · O2 numerical_behavior
- Interfaces
- PASS · UI (SSR) / REST / MCP
- Supplemental domain review
- Not performed
- Named expert review
- Not performed
- CVP suite
- 19/19 golden · 7/7 CVP boundary · 7/7 invalid · 7/7 property · 2/2 metamorphic · 2/2 round-trip · 3/3 cross-interface · 10/10 CVP contract · Manifest
- Sources
- Encyclopedia of Mathematics — Greatest common divisor
- CalculatorX split convention
- Margaret Stevens — The Maths Workbook (University of Oxford)
- Evidence
- 11 legacy golden · 7 legacy boundary · legacy regression suite · 19/19 oracle-backed golden · 7/7 invalid · Artifact integrity PASS
- Semantic contract
- PASS
Full verification
Formulas
Core equations used by this calculator.
How to use
Choose a mode
Simplify, proportion, scale, split, compare, or convert.
Enter the known values
Leave the unknown blank in proportion mode, or enter a scale factor / total when needed.
Read the result and steps
See the reduced ratio, missing term, shares, or conversions.
Example calculations
Common configurations with formula and result.
Simplify
12:18
Proportion
4:7 = x:21
Scale
1:2.5:6.5 × 3
Split total
25 by 3:2
Concrete mix
1:2:3 with sand = 7
Quick checks
Common values at a glance.
| Problem | Result |
|---|---|
| Simplify 12:18 | 2:3 |
| 4:7 = x:21 | x = 12 |
| 2:5 × 4 | 8:20 |
| Split 25 by 3:2 | 15 and 10 |
| 4:6 vs 10:15 | equivalent |
| 3:5 as fractions of whole | 3/8 and 5/8 |
Ratio calculator specification
Version 1.0.3 · Engine tested
- Engine tested 26/26 tests · Production surface contract 10/10
- Named expert review Not performed
- Calculation version 1.0.3
- Definition
- A ratio compares relative sizes of two or more quantities (part-to-part), written A:B or A:B:C. Equivalent ratios keep the same relationship when every term is multiplied or divided by the same nonzero factor. Proportions equate two ratios: A:B = C:D.
- What it calculates
- Simplify, scale, and compare ratios; solve proportions; split a total; convert to fraction/decimal/percent.
- Inputs
- Ratio terms (2 or 3), optional missing term for proportions
- Scale factor or total amount depending on mode
- Outputs
- Simplified or scaled ratio
- Missing proportion term
- Shares of a total
- Equivalence check
- Fraction, decimal, and percent forms
- Formula
A:B = C:D ↔ A/B = C/D; simplify n terms via exact rationals, L=LCM(dᵢ), rᵢ′=L·rᵢ, g=GCF(|rᵢ′|); scale rᵢ → k·rᵢ; share = total × term/Σ for nonnegative terms- Assumptions
- Finite rationals: integers, terminating decimals, or simple fractions a/b.
- Proportion denominators in A/B or C/D must be nonzero when used.
- Simplify / proportion / compare allow negative terms. Split does not.
- Units
- Dimensionless (or consistent units across terms)
- Boundary conditions
- Cannot simplify an all-zero ratio → ALL_ZERO
- Proportion needs exactly one blank among A,B,C,D → PROPORTION_ONE_BLANK
- Split requires every ratio term ≥ 0 → SPLIT_NEGATIVE_TERM
- Split requires Σ terms > 0 → SPLIT_ZERO_SUM
- Scale divide-by-zero → DIVISION_BY_ZERO
- Numerical precision
- Terms are exact rationals. Simplify multiplies by L = LCM of all denominators, then divides by GCF of the resulting integers — the same n-term definition for A:B and A:B:C.
- Integer inputs have L = 1, so denominator clearing is skipped and the terms are divided directly by their GCF. Decimal or fraction inputs show the LCM clearing step.
- Shareable URLs (?aInput=12&bInput=18&mode=simplify) restore inputs and are server-rendered with the same deterministic engine. Query `v` is ignored — it is not a calculation_version pin. Pin a version with REST/MCP `CalculatorX-Spec-Version`.
- REST and SSR return { value, mode, formula, steps, … } plus mode-specific fields (terms, solved, shares, equivalent).
- Example
- 12:18 → 2:3; 1.5:2.25 → 2:3; 3/4:5/6 → 9:10; 4:7 = x:21 → x=12
- Validation cases
12 published on this page · 26/26 tests · Production surface contract 10/10 · View evidence
- simplify 12:18 → 2:3
- 4:7 = x:21 → 12
- 2:5 × 4 → 8:20
- split 25 by 3:2 → 15, 10
- 4:6 vs 10:15 → equivalent
- 1.5:2.25 → 2:3
- 3/4:5/6 → 9:10
- split −2:3 of 100 → error SPLIT_NEGATIVE_TERM
- simplify 6:9:12 → 2:3:4
- 1:2:3 × 4 → 4:8:12
- split 30 by 1:2:3 → 5, 10, 15
- convert 2:3 → A/B = 2/3; 40% | 60% of whole
- Sources
- Encyclopedia of Mathematics — Greatest common divisor — Pairwise Euclidean GCF used after clearing denominatorsSupports: Computation of the GCF of the integerized ratio terms after clearing denominators; multiple-term GCF is obtained iteratively (GCF(a,b,c)=GCF(GCF(a,b),c))
- CalculatorX split convention — Nonnegative parts onlySupports: Split requires every term ≥ 0 and Σ terms > 0, so shares are nonnegative allocations of a total
- Margaret Stevens — The Maths Workbook (University of Oxford) — Chapter 1, §1: Algebraic Expressions and Fractions; §3: EquationsSupports: Algebraic addition/subtraction, multiplication/division, distributive rules, equivalent fractions, common denominators and reciprocals. Ratios are interpreted as quotients. Equality of ratios with nonzero denominators permits cross multiplication, and solving a proportion uses the chapter’s equation transformations. A zero divisor is excluded; integer quotient/remainder uses the separately cited Euclidean-division reference. Mathematical reference only; not implementation validation or an endorsement of CalculatorX.
- Encyclopedia of Mathematics — Greatest common divisor — Pairwise Euclidean GCF used after clearing denominators
- Calculation version
- 1.0.3
Background
Interpretation and common distinctions.
What does this ratio calculator compute?
A ratio compares relative sizes of two or more quantities (part-to-part), written A:B or A:B:C. Equivalent ratios keep the same relationship when every term is multiplied or divided by the same nonzero factor. Proportions equate two ratios: A:B = C:D.
The published formula or method is A:B = C:D ↔ A/B = C/D; simplify n terms via exact rationals, L=LCM(dᵢ), rᵢ′=L·rᵢ, g=GCF(|rᵢ′|); scale rᵢ → k·rᵢ; share = total × term/Σ for nonnegative terms. The following references support the stated mathematics or method:
- Margaret Stevens — The Maths Workbook (University of Oxford): Algebraic addition/subtraction, multiplication/division, distributive rules, equivalent fractions, common denominators and reciprocals. Ratios are interpreted as quotients. Equality of ratios with nonzero denominators permits cross multiplication, and solving a proportion uses the chapter’s equation transformations. A zero divisor is excluded; integer quotient/remainder uses the separately cited Euclidean-division reference. Mathematical reference only; not implementation validation or an endorsement of CalculatorX.
Which inputs and limits should you check?
Follow the input domain, units, branch or solve direction, and rounding policy in the specification. Preserve exact outputs and any additional candidates or warnings.
The worked example uses 12:18 with ÷ GCF 6. Compare it with the Example calculations and the complete result for the same inputs.
How can you verify and cite this result?
CalculatorX is responsible for this page. The mathematical references above explain the model; implementation checks and their scope are documented separately in the math.ratio v1.0.3 Evidence and capability contract. Read the displayed verification and production state together with the specification's numerical limits.
Use the clean calculator URL to cite the tool. A shared input link identifies a particular calculation. Content updates, numerical verification, and domain reviews have separate dates and scopes.
What is a ratio?
A ratio compares the relative size of two or more numbers. Common writings:
A:Bor “A to B”- as a fraction A/B (part-to-part)
- three-term forms such as
A:B:C(recipes, mixes)
Part-to-part compares parts to each other (e.g. cucumber:tomato = 5:4). Part-to-whole compares a part to the total (e.g. cucumber:vegetables = 5:50 = 1:10).
Modes in this calculator
| Mode | Use when |
|---|---|
| Simplify | Reduce A:B or A:B:C to lowest terms |
| Proportion | Solve A:B = C:D for one missing value |
| Scale | Multiply or divide every term by a factor |
| Split | Divide a total using the ratio parts |
| Compare | Check whether two ratios are equivalent |
| Convert | Fraction, decimal, %, and part-of-total % |
Input precision, limits and data paths
Use at most48 digits per integer/decimal, or per numerator and denominator of a fraction; signs do not count, leading zeros count, and each token is limited to128 characters. Two or three terms are supported in simplify, scale and split; other modes use A/B and, when needed, C/D. Matching aliases must name the same rational value; conflicting aliases, unknown fields and nonempty inactive fields are rejected.
Decimal and fraction strings preserve the accepted rational exactly. JSON numbers have already passed through binary64 parsing; unsafe integer numbers are rejected, and decimals use their shortest normalized decimal text. Send exact source values as strings. Exponents, mixed numbers and zero fraction denominators are rejected. Exactness applies to accepted tokens, not information rounded before the request.
A proportion requires exactly one blank and a unique solution with both B and D nonzero, including a solved denominator. Degenerate cross-product equations do not establish a valid quotient. Scale factors must be nonzero; split terms and totals must be nonnegative, with a positive sum of terms. Convert leaves undefined A/B or part-of-whole percentages as null and explains the condition. Bars show approximate part-of-whole shares; tiny parts may be invisible, so exact values remain in the text legend. Negative ratios have no part-of-whole bar.
Calculations run locally in the browser. Shared URLs send parameters to the server; REST/MCP also send inputs. Browser history may retain the most recent20 local snapshots; Clear inputs does not delete that history. Optional analytics depends on site configuration; a retention period, deletion guarantee or processing region is not established by this review. Share version labels identify the current-engine calculation and do not replay a historical engine; use REST/MCP version pins for strict version matching.
Related tools
Other calculators in this family: Percent Error Calculator, Percentage Calculator, Percentage Change Calculator, Proportion Calculator . Explore all Percent, Ratio & Proportion.
Frequently asked questions
Key distinctions behind the calculation.
What is a ratio?
A comparison of relative sizes of quantities, often written A:B (“A to B”). Part-to-part ratios compare parts to each other; part-to-whole compares a part to the total.
How do you simplify a ratio?
Divide every term by their greatest common factor (GCF). Example: 12:18 ÷ 6 → 2:3.
What is an equivalent ratio?
Two ratios that express the same relationship, such as 2:3 and 4:6. You get them by multiplying or dividing all terms by the same nonzero number.
How do you solve a proportion A:B = C:D?
Write A/B = C/D and cross-multiply: A·D = B·C. Solve for the missing letter. Example: 4:7 = x:21 → x = 4×21/7 = 12.
Can I split a total by a ratio?
Yes, when every ratio term is ≥ 0. Add the parts, then each share is total × (that part / sum). For 3:2 and total 25: shares are 15 and 10. Negative terms are rejected in Split.
How do I convert a ratio to a fraction of the whole?
Add the terms for the whole. Each term becomes a numerator over that sum. For 1:2, whole = 3 → 1/3 and 2/3.
Are three-term ratios supported?
Yes for simplify, scale, and split (A:B:C). Proportion mode solves two-term pairs A:B = C:D.
How are decimals and fractions simplified?
Each term is an exact rational. The calculator multiplies every term by the LCM of all denominators, then divides by the GCF of those integers. Example: 1.5:2.25 → 3/2:9/4 → multiply by 4 → 6:9 → GCF 3 → 2:3. Same n-term rule for 6:9:12 → 2:3:4. Integer inputs skip the clearing step.
Can a split use negative ratio terms?
No. Split requires every term ≥ 0 and a positive sum, so shares are ordinary nonnegative allocations. Simplify, proportion, and compare still allow negatives (for example −12:18 → −2:3).
Is 2:3 the same as 66.67%?
No. 2:3 is part-to-part. Of a whole of 5 parts, the shares are 40% and 60%. 2 as a percent of 3 is a different reading (A of B), shown separately in Convert.