Decimal to Fraction Converter
Convert any decimal to a fraction. Exact for terminating decimals, best rational approximation for repeating or irrational values. Mixed form included.
Convert a decimal to a fraction
Try 0.5, 1.25, 0.333333, or 3.14159265358979.
Caps the search. Default 10,000.
How many trailing digits repeat.
Fraction
5/8
Pretty: 5/8
Decimal in
0.625
Match
Exact
Error
0
Frequently Asked Questions about the Decimal to Fraction Converter
How does the converter turn a decimal into a fraction?
For terminating decimals, it reads the digits as written and divides by the right power of ten, then reduces with the greatest common divisor. For example, 0.625 becomes 625/1000, which reduces to 5/8. For non-terminating decimals like pi, it walks the continued-fraction convergents and returns the best rational approximation whose denominator stays within your cap.
What does the max denominator setting control?
It caps how large the bottom of the fraction is allowed to grow. A small cap (say 10) gives you a friendly approximation like 22/7 for pi. A larger cap (10,000) lets the converter reach 355/113 (Milue), which matches pi to about seven decimal places. Lower the cap when you want a fraction you can read out loud.
Why is the result marked as an approximation?
Some decimals cannot be written exactly as a fraction with a small denominator. Irrational numbers like pi or sqrt(2) and repeating decimals like 0.333... fall into this group. The converter then picks the closest rational with a denominator no larger than your cap and reports the rounding error so you can decide whether it is close enough.
When should I use the repeating digits option?
Use it when you typed a truncated form of a repeating decimal and want the exact underlying fraction. Enter 0.166666 with one repeating digit and you get 1/6, not 83333/500000. The converter expands the repetend with the standard repeating-decimal identity, so the result is exact within your stated intent.
How are mixed numbers and negative values handled?
Improper fractions are split into a whole part and a remainder. The decimal 1.25 shows as 5/4 with a mixed form of 1 1/4. Negative inputs keep their sign: -0.5 returns -1/2 and -1.75 returns -7/4 with mixed form -1 3/4. Zero always returns 0/1.