Ratio Calculator

Simplify ratios, compute equivalent ratios, solve proportions \(a:b = c:d\), and scale amounts to a new total, with clear step-by-step explanations.

1. Simplify a ratio

Enter the two numbers that form your ratio \(a:b\). The calculator finds the greatest common divisor (GCD) and returns the ratio in lowest terms.

Decimals are supported. Internally we convert to whole numbers to compute the GCD.

Simplified ratio

Result:

GCD steps will appear here after a calculation.

2. Scale a ratio to a new total

Given a ratio \(a:b\) and a desired total amount \(T\), compute the corresponding parts \(A\) and \(B\) such that \(A + B = T\) and \(A:B = a:b\).

Used in budgeting, recipes, mixtures, and any situation where you distribute a total according to a fixed ratio.

Scaled amounts

\(A =\) , \(B =\)

Explanation will appear here after a calculation.

3. Proportion solver \(a:b = c:d\)

Solve a missing term in the proportion \(a:b = c:d\). Enter the known terms, choose which position is unknown, and the calculator uses cross-multiplication to find it.

Select exactly one position as unknown and leave its input blank (or any placeholder). The other three must be valid numbers.

Proportion result

Solution:

Cross-multiplication steps will appear here after a calculation.

4. Ratio to fraction & percentage

Convert a ratio \(a:b\) into a fraction \(a/b\), a decimal and percentages of the total \(a + b\) for both parts.

Conversion results

  • Fraction \(a/b\):
  • Decimal \(a/b\):
  • First part as % of total:
  • Second part as % of total:

What is a ratio?

A ratio compares two quantities by division. If you have numbers \(a\) and \(b\), the ratio is written as \(a:b\) and read “\(a\) to \(b\)”. The same relationship can also be written as the fraction \(\dfrac{a}{b}\), provided \(b \neq 0\).

Ratios are ubiquitous in everyday life: mixing ingredients, sharing costs, scaling drawings, computing exchange rates, or expressing odds and probabilities.

How to simplify a ratio

To simplify a ratio \(a:b\) you divide both terms by their greatest common divisor (GCD). The GCD of two integers is the largest positive integer that divides both numbers without remainder.

\(\text{Let } g = \gcd(a,b).\) Then the simplified ratio is \[ a:b = \frac{a}{g} : \frac{b}{g}. \]

The calculator automatically detects decimal inputs, converts them to integers internally (by multiplying by a suitable power of 10), and then applies the Euclidean algorithm to find the GCD.

Scaling a ratio to a new total

Suppose a budget is split in the ratio \(a:b\) and you want the total to be \(T\). The shares \(A\) and \(B\) should satisfy:

  • \(A + B = T\)
  • \(A:B = a:b\)

Writing \(A = k a\) and \(B = k b\), the total condition becomes \[ k(a + b) = T \quad \Rightarrow \quad k = \frac{T}{a + b}. \] Therefore

\(A = \dfrac{a}{a + b} \, T,\quad B = \dfrac{b}{a + b} \, T.\)

This is exactly what the “Scale ratio to a new total” card computes, with an explanation and rounded values.

Proportions: when two ratios are equal

A proportion is an equation of the form \[ a:b = c:d, \] which is equivalent to the fractional equation \[ \frac{a}{b} = \frac{c}{d} \] whenever \(b\) and \(d\) are non-zero.

Using cross-multiplication we get \[ ad = bc. \] From this identity you can solve for any missing term, for example:

  • If \(d\) is unknown: \(d = \dfrac{b c}{a}\).
  • If \(c\) is unknown: \(c = \dfrac{a d}{b}\).
  • If \(b\) is unknown: \(b = \dfrac{a d}{c}\).
  • If \(a\) is unknown: \(a = \dfrac{b c}{d}\).

The Proportion solver card automates these calculations and checks for division by zero.

From ratio to fraction and percentage

A ratio \(a:b\) can be interpreted in two common ways:

  1. As the fraction \(\dfrac{a}{b}\) (comparison of part \(a\) to part \(b\)).
  2. As the split of a total into two parts, where the total is \(a + b\).

In the second interpretation, the percentage of the total represented by the first part is

\(\dfrac{a}{a + b} \times 100\%\),

and the second part is \(\dfrac{b}{a + b} \times 100\%\). The conversion card reports both.

FAQ – Ratio calculator

Can I enter negative numbers in a ratio?

In most practical applications (lengths, amounts, counts) ratios involve non-negative quantities. The calculator accepts negative inputs for completeness but will show the sign in the simplified ratio and conversions. For mixing or budgeting problems you typically want all values to be non-negative.

Why does the calculator warn about very small or very large numbers?

To keep results numerically stable and transparent, the tool limits the magnitude of inputs for some operations. Extremely large numbers or many decimal places can cause rounding artefacts in floating-point arithmetic. When that happens, the calculator will ask you to scale the numbers to a more moderate range.

What if the total \(a + b\) is zero?

If both terms of the ratio are zero, the ratio is undefined for scaling purposes because any total \(T\) must be distributed proportionally to the original parts. The calculator detects this situation and prompts you to adjust the ratio.

Is this ratio calculator suitable for financial or engineering work?

The underlying formulas (ratios, proportions, percentages) are standard and suitable for professional use. For high-stakes applications you should still verify the inputs, check that the interpretation of the ratio matches your model, and, if necessary, cross-check results with a secondary method or system.