Home · Math · Ratios & Proportions · Ratio Calculator

Ratio Calculator

A ratio compares two quantities; dividing both terms by their greatest common divisor gives the simplest whole-number form, and a ÷ b gives its decimal value.

Your figures

Example result — edit the figures to make it yours

1.5

Ratio as a decimal (a ÷ b)

Simplified first term3
Simplified second term2
a as a share of the total60.00 %

What this calculator does

A ratio compares two quantities; dividing both terms by their greatest common divisor gives the simplest whole-number form, and a ÷ b gives its decimal value. Every figure on this page is computed from the formula or definition stated below, with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

Ratio a : b, simplified by dividing both terms by gcd(a, b)

A ratio compares two quantities; dividing both terms by their greatest common divisor gives the simplest whole-number form, and a ÷ b gives its decimal value.

Inputs use the units shown in the field labels and every denominator or total must be non-zero. The result is an arithmetic value from the stated formula only; it is not a quote, a rating or professional advice. Percent fields hold the percent number itself (6.5 means 6.5%); expressions divide by 100 wherever a fraction is needed, and percentage results are reported back as percent numbers.

Worked example

With the example inputs this page opens with (first number (a) 12, second number (b) 8), the result is 1.5000 — ratio as a decimal (a ÷ b). Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying first number (a)
First number (a)Ratio as a decimal (a ÷ b)
60.7500
9.61.2000
121.5000
151.8750
182.2500
243.0000

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does the Ratio Calculator work?

A ratio compares two quantities; dividing both terms by their greatest common divisor gives the simplest whole-number form, and a ÷ b gives its decimal value. First number · Second number → Ratio as a decimal (a ÷ b). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Ratio Calculator need?

First number · Second number → Ratio as a decimal (a ÷ b). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Ratio Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.