Decimal to Fraction Converter
Type a decimal and get the exact fraction, simplified, plus the mixed-number form. Terminating decimals are easy — but this converter also handles the case most calculators quietly fudge: repeating decimals.
Write the repeating part in brackets: 0.(3) for 0.333…, 0.1(6) for 0.1666…, 1.2(45) for 1.2454545…. The conversion is exact — nothing is truncated to force an answer.
For a repeating decimal, put the repeating part in brackets: 0.(3) means 0.333…, 1.2(45) means 1.2454545…
As a fraction (exact)
1/3
As a mixed number
—
The value is a whole number or below 1, so it has no mixed form.
Decimal expansion
0.(3)
Regenerated from the fraction by long division — the bracketed part is the true repeating cycle.
As a percentage
33.3333%
Rounded for display; the fraction is the exact value.
How it is worked out
- The non-repeating part contributes 0/10^0 and the repeating block uses the identity 0.(3) = 3/9, shifted by the 0 non-repeating digit(s): fractional part = 1/3 before simplifying.
- Adding the whole part and simplifying by the greatest common divisor gives the exact fraction — repeating decimals are never truncated.
Embed this calculator on your website →
The formula
terminating: fraction = digits ÷ 10^d, simplified
repeating block B (k digits) after m plain digits: contribution = B ÷ (10^m × (10^k − 1))
- the “all nines” denominator — 10^k − 1 is 9, 99, 999…: that is why 0.(3) = 3/9 = 1/3 exactly, never a truncated 0.333.
- everything is exact big-integer arithmetic; the mixed number is the whole part plus the simplified remainder.
Worked example: 0.(142857) = 142857 ÷ 999999 = 1/7 — and 2.675 = 2675/1000 = 107/40.
How it works
A terminating decimal is its digits over a power of ten, simplified: 2.675 = 2675/1000 = 107/40. A repeating decimal uses the geometric-series identity behind the bracket notation: a repeating block B of k digits, after m non-repeating digits, contributes B ÷ (10^m × (10^k − 1)) — the “all nines” denominator. So 0.(142857) = 142857/999999 = exactly 1/7.
The decimal expansion shown in the result is regenerated from the fraction by long division with cycle detection, so the repeating block you see is the fraction's true cycle — a check on the conversion, not an echo of your input.
All arithmetic is exact big-integer work. The stated limits — 30 digits in total, 18 in the repeating block — exist only to keep a pathological paste from building an astronomical denominator.
Examples
- 0.(3) → 1/3 exactly (33.3333% as a rounded display).
- 2.675 → 107/40, or 2 27/40 as a mixed number.
- 0.(142857) → 1/7 — the famous six-digit cycle of sevenths.
- 1.2(45) → 137/110 = 1 27/110.
Frequently asked questions
Is 0.(9) really equal to 1?
Yes — exactly, not approximately. By the same identity this tool uses, 0.(9) = 9/9 = 1, and 2.(9) = 3. There is no 'infinitely close but less': a repeating decimal names a precise rational number, and 0.(9) and 1 are two names for the same one. The converter returns 1, because anything else would be wrong.
Why do some decimals never terminate as fractions-to-decimals?
A fraction in lowest terms terminates only when its denominator has no prime factors other than 2 and 5. 1/6 = 0.1(6) repeats because 6 = 2 × 3; 1/7 repeats with a six-digit cycle because 7 divides 999999. The fraction is the exact form; the decimal is the one that has to compromise.
Can I convert a fraction to a decimal here?
That direction lives in the Fractions calculator: enter any fraction and it shows the exact fraction, the mixed number, a rounded decimal, and a percentage.
Why is a fraction more exact than the decimal I typed?
A fraction stores the value as one whole number over another — 1/3 is exactly one third. A decimal expansion of it never ends, so any typed or stored decimal is a rounding. Converting back to a fraction recovers the exact value the decimal was approximating.
When is a mixed number shown instead of a plain fraction?
When the fraction is larger than 1: the converter splits it into a whole part and a proper fraction, so 7/4 is shown as 1 3/4 as well as 7/4. Both forms are the same value — the mixed number is simply easier to picture for measurements and recipes.
Related calculators
Fractions Calculator
LiveAdd, subtract, multiply, divide, simplify, and compare fractions with steps.
Number to Words Converter
LiveSpell whole numbers and decimals in international or lakh-and-crore format, with exact handling for very large values.
Ratio and Proportion Calculator
LiveSimplify ratios, scale recipes or plans, and solve missing values in proportions.

