Explore
Open navigation menu
Math
Free tool

Decimal to Fraction Calculator

Convert a finite decimal string exactly to a simplified fraction without binary floating-point rounding.

No account needed · Calculated in your browser

Convert a decimal to a fraction

Enter a finite decimal with up to 12 decimal places. Decimal point and decimal comma are supported.

How to use this calculator

Three steps to an answer you can interpret.

1

Enter a finite decimal

Use a point or comma and at most twelve decimal places.

2

Convert and reduce

The tool uses place value, then divides by the greatest common divisor.

3

Read the exact form

See the reduced fraction and, where applicable, a mixed number.

Understand the result

A finite decimal can be written exactly as an integer divided by a power of ten, then simplified.

Place-value method

For 0.125, remove the decimal point to get 125 and use 1000 as the denominator because there are three decimal places: 125/1000.

Worked examples

0.5 becomes 5/10 and simplifies to 1/2. 1.25 becomes 125/100 and simplifies to 5/4, or 1 1/4 as a mixed number.

A truncated repeating decimal is converted as the exact finite number entered.

Simplifying with gcd

Divide numerator and denominator by their greatest common divisor. For 125/1000, the GCD is 125, giving the simplified fraction 1/8.

Negative decimals

The sign is preserved. For example, -2.75 becomes -275/100 and simplifies to -11/4.

Trailing zeros

Trailing zeros do not change the mathematical value. 0.500 and 0.5 both simplify to 1/2.

Finite vs repeating decimals

This calculator accepts finite decimal notation. A repeating decimal describes infinitely many digits and cannot be represented by typing only a finite truncated string.

Limitation: repeating decimals are not entered as finite strings

If you type 0.333, the calculator converts exactly 333/1000. It does not infer that you intended the repeating value one third.

Common mistakes

  • Using 10 as the denominator regardless of the number of decimal places.
  • Converting through binary floating point before constructing the fraction.
  • Assuming a truncated repeating decimal is the exact repeating value.

Learn with this tool

Related guide

Ratios, Fractions and Decimals Explained

Understand ratios, fractions and decimals, including equivalent forms, simplification, terminating and repeating decimals, and part-to-part versus part-to-whole meaning.

Read guide

More useful tools

View all

Frequently asked questions

Is the conversion exact?

Yes. The input digits are processed as text and converted using integer arithmetic before reduction.

Can I use a decimal comma?

Yes, provided the input uses one consistent decimal separator.