Math

Decimal to Ratio Calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a decimal to ratio calculator?

A decimal to ratio calculator turns a single decimal number into a ratio of two whole numbers written as a:ba : b. A ratio compares two quantities, and many everyday decimals — odds, mixing proportions, aspect dimensions, gear teeth counts — are easier to read and reason about when expressed as a clean pair of integers rather than a long decimal.

For example, the decimal 0.750.75 describes the same relationship as the ratio 3:43 : 4: for every 3 parts of one quantity there are 4 parts of the whole. The calculator does the arithmetic and the simplification for you, returning the smallest possible whole-number terms.

How does it work?

A finite decimal is just a fraction whose denominator is a power of ten. The calculator follows three steps:

  1. Read the decimal as a fraction over a fixed power of ten (the denominator).
  2. Compute the greatest common divisor (GCD) of the numerator and denominator.
  3. Divide both terms by the GCD so the ratio is fully reduced.

The reduced numerator becomes the first term (the antecedent) and the reduced denominator becomes the second term (the consequent).

Formula

For a decimal xx with denominator dd (a power of ten large enough to clear the decimal places):

a=round(xd)gcd(round(xd),d)a = \frac{\text{round}(|x| \cdot d)}{\gcd(\text{round}(|x| \cdot d),\, d)}

b=dgcd(round(xd),d)b = \frac{d}{\gcd(\text{round}(|x| \cdot d),\, d)}

The result is the ratio a:ba : b. A negative decimal keeps its sign on the first term, for example 0.753:4-0.75 \rightarrow -3 : 4.

Examples

  1. Convert 0.750.75:

    • Over 100100 this is 75100\frac{75}{100}.
    • gcd(75,100)=25\gcd(75, 100) = 25, so dividing gives 34\frac{3}{4}.
    • Ratio: 3:43 : 4.
  2. Convert 0.50.5:

    • Over 1010 this is 510\frac{5}{10}.
    • gcd(5,10)=5\gcd(5, 10) = 5, so dividing gives 12\frac{1}{2}.
    • Ratio: 1:21 : 2.
  3. Convert 2.52.5:

    • Over 1010 this is 2510\frac{25}{10}.
    • gcd(25,10)=5\gcd(25, 10) = 5, so dividing gives 52\frac{5}{2}.
    • Ratio: 5:25 : 2.
  4. Convert 0.20.2:

    • Over 1010 this is 210\frac{2}{10}.
    • gcd(2,10)=2\gcd(2, 10) = 2, so dividing gives 15\frac{1}{5}.
    • Ratio: 1:51 : 5.

Practical notes

  • The ratio is always returned in lowest terms, so 0.500.50 and 0.50.5 both give 1:21 : 2.
  • A ratio such as 5:25 : 2 is greater than one; this simply means the first quantity is larger than the second.
  • If you need the result as a fraction instead, the ratio a:ba : b is the same as the fraction ab\frac{a}{b} — see the decimal to fraction calculator or convert a ratio back with the ratio to fraction calculator.

FAQs

What does “reduced ratio” mean?

A reduced ratio uses the smallest whole numbers that preserve the same proportion. The terms share no common factor other than 1, which is why 75100\frac{75}{100} is shown as 3:43 : 4 rather than 75:10075 : 100.

Can it handle numbers greater than one?

Yes. Decimals above one, like 2.52.5, produce ratios where the first term is larger than the second, such as 5:25 : 2.

How are negative decimals handled?

The sign is attached to the first term of the ratio. For instance, 0.75-0.75 becomes 3:4-3 : 4.

Report a bug

This field is required.