Math

Decimal to Fraction Calculator

Convert any decimal number to a fraction with adjustable precision. Shows mixed numbers and step-by-step conversion.

CALCULATOR

Enter your numbers

Instant results
3/4Fraction
Numerator3
Denominator4

THE NUMORIX GUIDE

How to use the Decimal to Fraction Calculator

Last reviewed September 14, 2026

What this calculator does

Choose a maximum denominator of 10^precision, search denominators from 1 through that limit for the closest rounded numerator, reduce numerator and denominator by GCD, and display an optional mixed number.

Formula and method

Choose a maximum denominator of 10^precision, search denominators from 1 through that limit for the closest rounded numerator, reduce numerator and denominator by GCD, and display an optional mixed number.

Variables and inputs

Decimal defaults to 0.75 and Precision to 6. Precision is clamped to 1-8 and controls the largest denominator search, not the number of decimal digits printed.

Worked example

For 0.75 with precision 6: denominator 4 gives numerator round(0.75*4)=3 with zero error; reduce by gcd(3,4)=1; result = 3/4 and decimal check = 0.750000.

How to interpret the result

The result is an exact fraction when the decimal has a matching rational representation within the search; otherwise it is the closest fraction found under the selected precision.

Common mistakes to avoid

Do not assume every finite decimal has a small denominator, and do not confuse precision with guaranteed exactness. Check the decimal verification line.

Assumptions and limitations

The brute-force search can be expensive at precision 8 and uses floating-point comparison. It approximates repeating decimals and does not preserve a symbolic repeating pattern.

Practical use and checks

Decimal to Fraction approximates a decimal with an integer numerator and denominator, then reduces the pair. Enter 0.75 with precision 6 as a check; the result should be 3/4, with a mixed-number display of 3/4 and a verification near 0.7500000000. Enter -1.25 as another check; a signed result of -5/4 should appear. Use the fraction form when an exact recipe, rational coefficient, or classroom solution is easier to communicate than a repeating decimal. Precision is a limit on the denominator search, not a promise that every decimal has an exact finite fraction. A value such as 0.333333 can return a close approximation whose error should be checked against the tolerance of the application. Higher precision can increase work and still cannot recover digits that were already rounded in the original measurement. The engine caps the effective precision range and uses floating-point arithmetic, so very long decimal strings are not preserved exactly. A zero decimal should reduce to 0, while a negative value keeps its sign separate from the positive denominator. Do not turn a measured decimal into an exact physical truth merely because the output has a simple fraction; record the original value, chosen precision, and acceptable error with the result.

Sources and references

COMMON QUESTIONS

Frequently asked questions

What does precision 6 control?

It sets a maximum denominator of 10^6 after clamping, giving the search more candidate denominators; it does not mean six significant digits.

How should I convert 0.333333?

The calculator finds a close fraction, commonly 1/3 at adequate precision, but a rounded decimal is not proof of an exact repeating value.

FROM THE NUMORIX GUIDES

Learn more before you decide