Calculators.Life Calculator
Math

Decimal to Fraction Calculator

Input Parameters

Scenarios
The decimal number you want to convert into a simplified fraction or mixed number.
Number of digits at the end of the decimal that repeat infinitely (0 for non-repeating).
Round to the nearest fraction unit, e.g., 8 for 1/8, 10 for 1/10, 16 for 1/16, or 0 for exact.

Computed Results

Result Fraction
1 3/5
Whole Number1
Numerator3
Denominator5
Exact Mixed Number1 5/8
Exact Improper Fraction13/8

The decimal to fraction calculator converts any decimal number into a simplified fraction or mixed number. It handles both standard and repeating decimals, and allows you to round the result to a specific denominator, making it useful for math problems, construction measurements, and everyday conversions.

How to Use the Calculator

Follow these steps to convert your decimal into a fraction:

  1. Enter a Decimal Number: Input the decimal you want to convert (e.g., 1.625).
  2. Repeating Trailing Decimals: If your decimal repeats infinitely at the end, enter the number of repeating digits. For example, for 0.333..., enter 1. If it does not repeat, leave this as 0.
  3. Rounding Denominator (Optional): If you need the fraction rounded to a specific unit (like 1/8 or 1/16 for measurements), enter that number. Enter 0 for an exact conversion.

Formula & Explanation

Converting a decimal to a fraction depends on whether the decimal is terminating (ends) or repeating.

Terminating Decimals

For a terminating decimal, write the decimal digits over a power of 10 corresponding to the number of decimal places, then simplify by dividing the numerator and denominator by their greatest common divisor (GCD).

Fraction = Decimal Digits ÷ 10ⁿ

Where n is the number of decimal places.

Repeating Decimals

For repeating decimals, the denominator is constructed using 9s (for each repeating digit) followed by 0s (for each non-repeating decimal digit). The numerator is the entire decimal part minus the non-repeating part.

Numerator = (All Decimal Digits) − (Non-Repeating Digits)
Denominator = (9s for repeating digits) followed by (0s for non-repeating digits)

Inputs & Outputs

FieldTypeDescription
Enter a Decimal NumberInputThe decimal number to be converted.
Repeating Trailing DecimalsInputThe count of digits at the end of the decimal that repeat infinitely.
Rounding DenominatorInputOptional target denominator to round the fraction to (e.g., 8, 16).
Result FractionOutputThe final simplified fraction or mixed number.
Whole NumberOutputThe integer portion of the mixed number.
NumeratorOutputThe top number of the resulting fraction.
DenominatorOutputThe bottom number of the resulting fraction.
Exact Mixed NumberOutputThe exact conversion formatted as a mixed number.
Exact Improper FractionOutputThe exact conversion formatted as a single top-heavy fraction.

Verified Scenario Walkthroughs

Simple Non-Repeating Decimal

Converting 0.75 with no repeating digits and no rounding yields exactly 3/4. The exact improper fraction is also 3/4.

Repeating Decimal with Rounding

If you enter 0.3333 with 4 repeating digits and set a rounding denominator of 3, the calculator identifies the repeating pattern and simplifies the result to exactly 1/3.

Large Number with High Precision Rounding

Entering 12.875 with a rounding denominator of 8 results in the mixed number 12 7/8. The exact improper fraction is calculated as 103/8.

Complex Repeating Decimal

For the decimal 2.1666 with 1 repeating digit (the 6) and no rounding, the calculator determines the exact mixed number is 2 1/6, which corresponds to the improper fraction 13/6.

Practical Use Cases

Converting decimals to fractions is frequently required in various practical scenarios:

Frequently Asked Questions

How do I handle a decimal that repeats forever?

Enter the decimal up to a few places, then specify how many of the final digits repeat infinitely in the 'Repeating Trailing Decimals' field. The calculator will use the correct mathematical formula to find the exact fraction.

What does the rounding denominator do?

It forces the calculator to round the decimal to the nearest fraction with that specific denominator. For example, setting it to 16 will round your decimal to the nearest 1/16th, which is highly useful for reading a tape measure.

What is the difference between a mixed number and an improper fraction?

A mixed number combines a whole number and a fraction (like 1 3/4). An improper fraction places the entire value into the fraction, making the numerator larger than the denominator (like 7/4).

Author portrait
About the Author
Arnab Biswas

Calculator developer and SEO strategist who builds practical online calculators and tests calculation logic, input handling, and expected results using real-world scenarios.