TOOLFRED WORKED EXAMPLE

Fractions, mixed numbers and rounded decimals

Convert exactly what you entered, and keep a rounded decimal separate from the fraction it approximates.

By · Updated · Original examples

THE SHORT ANSWER

How do you turn a decimal into an exact fraction?

Write a finite decimal over a power of ten, then simplify. For example, 0.125 = 125/1000 = 1/8. A rounded decimal is exact only as typed: 2.16666666667 is close to 13/6, but is not equal to it.

Input or expressionExact result
0.1251/8
1 1/2 + 2/313/6 = 2 1/6
2.16666666667216666666667/100000000000

Convert a finite decimal

Open the fraction calculator and choose Convert or simplify one number. Enter 0.125. Three decimal places mean 125/1000; dividing the numerator and denominator by 125 gives 1/8. The value is exact. The second-number field is unnecessary in this mode.

Add mixed numbers with a common denominator

Choose Add, enter 1 1/2 and 2/3. First convert 1 1/2 to 3/2. Re-express the fractions as 9/6 and 4/6. Their sum is 13/6, or 2 1/6. The displayed decimal is an approximation rounded to 12 significant digits.

Two values that look similar

13/6 = 2.1666666… with sixes continuing forever.
2.16666666667 = 216666666667/100000000000 exactly as entered.

The finite decimal is larger than 13/6 by exactly 1/300000000000. Rounding both values on a short display can hide this difference.

Why the tool does not guess repeating digits

A finite string might be a measurement, an exact amount, or a rounded intermediate result. Automatically replacing it with a nearby simple fraction would change the supplied value. Enter 13/6 to retain that exact repeating value. Repeating-decimal notation such as 0.(3) is not accepted.

Signs, simplification and boundaries

Converting 12/18 gives 2/3. A negative mixed number such as −1 1/2 means −(1 + 1/2), which is −3/2. Zero denominators are rejected. Inputs allow up to 30 digits per integer part, 12 decimal places and 100 characters. The arithmetic uses integer numerator/denominator pairs; it does not use binary floating-point to store the exact fraction. Measurement uncertainty is not assessed.

Check your result

Multiply 1/8 by 8 to recover 1. For the addition example, subtract 2/3 from 13/6 to recover 3/2. These checks test the arithmetic, not whether the input represents the quantity you intended. For scientific notation and expressions, use the scientific calculator.

Questions or corrections

Report a reproducible issue to contact@toolfred.com using an invented example. Avoid sensitive files. How we check tools and maintain examples →

All worked examples →