Mathovia

Math / Fractions & Decimals

Decimal to Fraction Calculator

Enter a decimal and choose how many decimal digits to convert exactly — the calculator returns the fraction in lowest terms.

Numerator
5
Denominator
8
GCD used to simplify
125
Decimal used (after rounding)
0.6250

The decimal is first written as a fraction over a power of 10 (0.625 = 625/1000), then both numbers are divided by their greatest common divisor to reach lowest terms.

M
Written by
Mathovia Team
Editorial Team

Every terminating decimal is secretly a fraction. 0.5 is 1/2, 0.75 is 3/4, and 0.625 is 5/8 — the trick is knowing how many zeros belong in the denominator and how far the fraction reduces. This calculator does both steps and shows its work.

How to Convert a Decimal to a Fraction (step by step)

Step One: Write the decimal over a power of 10

Count the digits after the decimal point, then put the decimal’s digits (without the point) over a 1 followed by that many zeros.

0.625 has 3 digits after the decimal point
0.625 = 625 / 1000

Step Two: Find the greatest common divisor (GCD)

The GCD of the numerator and denominator tells you the biggest number that divides evenly into both — that’s what you’ll divide out to simplify.

gcd(625, 1000) = 125

Step Three: Divide both numbers by the GCD

625 ÷ 125 = 5
1000 ÷ 125 = 8
0.625 = 5/8

With the calculator’s defaults (0.625, converted at 3 decimal digits), the result is exactly 5/8 — and 5 ÷ 8 does equal 0.625, confirming the conversion.

What your results mean

The numerator and denominator are your answer in lowest terms — this is the fraction you’d write on paper. The GCD used to simplify shows exactly what number both the raw numerator (625) and raw denominator (1000) were divided by to get there; if the GCD is 1, the fraction was already in lowest terms before simplifying.

The decimal used field shows the decimal value after rounding to your chosen digit count. If it doesn’t match what you typed, you rounded at fewer digits than your original number had — try a higher digit setting for more precision.

Common decimals and their fractions

DecimalFractionGCD used
0.51/25
0.251/425
0.753/425
0.1251/8125
0.3753/8125
0.21/52

Notice the GCD is what does the real work — a decimal like 0.5 (500/1000) needs a GCD of 500 to collapse all the way down to 1/2, while 0.375 only needs 125.

A note on precision

Choosing more decimal digits than your number actually has doesn’t hurt — trailing zeros just get absorbed into the GCD. But choosing fewer digits than you meant will round your input, which matters for anything beyond simple fractions. If you’re working from a measurement, it can help to check the result against the fraction to decimal calculator run in reverse, or compare it to the equivalent fractions calculator to see other fractions that represent the same value.

About the formula: The decimal is first written as a fraction over a power of 10 (0.625 = 625/1000), then both numbers are divided by their greatest common divisor to reach lowest terms.

Frequently Asked Questions

Why do I need to choose the number of decimal digits?+

A calculator can't tell from 0.625 alone whether you meant exactly three digits or a longer number you rounded when typing. Picking the digit count tells the calculator exactly what power of 10 to use as the starting denominator.

What if my decimal repeats, like 0.333...?+

A repeating decimal is technically a fraction with an infinite decimal expansion, so it can't be converted exactly using this power-of-10 method. Choose enough digits to approximate it closely (0.3333 gives 3333/10000, close to but not exactly 1/3), or use the exact fraction if you know it.

Does the calculator always fully simplify the fraction?+

Yes. It divides both the numerator and denominator by their greatest common divisor, so the fraction returned is always in lowest terms — you'll never get an answer like 4/8 when 1/2 is correct.

Related calculators