Decimal to Fraction Converter

Convert any terminating or repeating decimal to its exact simplified fraction. Full step-by-step algebraic working shown — including the GCD simplification and optional mixed-number form.

Terminating Decimals Repeating Decimals Step-by-Step Working GCD · Mixed Number · Decimal Check
Share this tool

Decimal Type

Decimal Value

fraction
(
)

Enter the base decimal in the first field and the repeating block in the second.
Example: 0.1 and 6 = 0.1(6) = 0.1666…   |   0 and 3 = 0.(3) = 0.333…

numerator / 10^(decimal places) → simplify by GCD

Quick Load:

Converting...

Enter a decimal and choose whether it terminates or repeats to get the exact fraction.

What Is a Decimal to Fraction Conversion?

A decimal and a fraction are two different ways of writing the same number. When you convert a decimal to a fraction, you find the exact ratio of two integers that equals that decimal value. For example, 0.5 and 1/2 express the same quantity — the fraction form is often more useful in cooking, engineering, and classroom maths because it shows the exact relationship without any rounding.

There are two types of decimals. A terminating decimal ends after a finite number of digits: 0.75, 0.125, and 1.25 are all terminating. A repeating decimal has one or more digits that cycle indefinitely: 0.333…, 0.1666…, and 0.142857142857… are repeating. Both types are rational numbers and can be converted to exact fractions, though the method differs.

How the Conversion Works

Terminating — 0.75

Step 1 — Count decimal places
0.75 → 2 places
Step 2 — Write over 10²
75 / 100
Step 3 — GCD(75, 100) = 25
75 ÷ 25 = 3 | 100 ÷ 25 = 4
Result
3/4

Repeating — 0.1(6)

Step 1 — Let x = 0.1666…
non-repeating: 1 digit (n=1)
repeating block: 1 digit (r=1)
Step 2 — Two multiplications
10x = 1.666…
100x = 16.666…
Step 3 — Subtract to cancel tail
100x − 10x = 16.666… − 1.666…
90x = 15
Result — GCD(15,90)=15
1/6

How to Convert a Terminating Decimal to a Fraction

Terminating decimals are the simpler case. The rule is: write the decimal digits as the numerator and the corresponding power of 10 as the denominator, then reduce by the Greatest Common Divisor (GCD).

Take 0.75 as an example. It has two decimal places, so the denominator is 10² = 100 and the numerator is 75. GCD(75, 100) = 25, so dividing both by 25 gives 3/4. The same process works for any length: 0.125 becomes 125/1000, GCD = 125, result = 1/8. For mixed numbers like 1.25, treat the entire number: 1.25 = 125/100 = 5/4, which can also be expressed as the mixed number 1 1/4.

How to Convert a Repeating Decimal to a Fraction

Repeating decimals require an algebraic approach called the elimination method. You multiply the decimal by two powers of 10, then subtract to cancel the repeating tail — leaving a simple equation to solve.

For a purely repeating decimal like 0.(3) = 0.333…: let x = 0.333…, multiply by 10 to get 10x = 3.333…, then subtract: 10x − x = 3 → 9x = 3 → x = 1/3.

For a mixed repeating decimal like 0.1(6) = 0.1666…: multiply by 10 (shift past the non-repeating "1") to get 10x = 1.666…, then multiply by 100 to get 100x = 16.666…. Subtract: 90x = 15 → x = 15/90 = 1/6. The general formula is denominator = 10^(n+r) − 10^n, where n is the count of non-repeating decimal digits and r is the length of the repeating block.

What Is a Recurring Decimal?

A recurring (or repeating) decimal is a decimal fraction in which a digit or group of digits repeats infinitely. Every rational number — a number expressible as a fraction a/b where a and b are integers and b ≠ 0 — either terminates or repeats. The converse is also true: every terminating or repeating decimal is a rational number.

A fraction a/b produces a terminating decimal if and only if b (when fully simplified) has no prime factors other than 2 and 5. That means 1/4 = 0.25 terminates (4 = 2²), but 1/3 = 0.333… repeats because 3 is neither 2 nor 5. The fraction 1/7 produces the six-digit repeating block 142857 because 7 does not divide any power of 10.

Irrational numbers like π = 3.14159… and √2 = 1.41421… neither terminate nor repeat. They cannot be expressed as exact fractions — only as approximations.

Common Decimal to Fraction Reference Table

DecimalFractionMixed NumberType
0.51/2—Terminating
0.251/4—Terminating
0.753/4—Terminating
0.1251/8—Terminating
0.21/5—Terminating
1.255/41 1/4Terminating
0.333…1/3—Repeating
0.666…2/3—Repeating
0.1666…1/6—Repeating
0.142857…1/7—Repeating
0.111…1/9—Repeating

Decimal to Fraction FAQ

What is the difference between a terminating and a repeating decimal?

A terminating decimal ends after a finite number of digits — 0.75, 0.5, and 0.125 are common examples. A repeating decimal has one or more digits that cycle without end — 0.333… (1/3), 0.1666… (1/6), and 0.142857142857… (1/7) are repeating. Both are rational numbers. Irrational numbers like π = 3.14159… are neither: they do not terminate and their decimal digits have no repeating pattern.

How do you convert 0.333… to a fraction?

Let x = 0.333…. Multiply both sides by 10: 10x = 3.333…. Subtract the original equation: 10x − x = 3.333… − 0.333…, giving 9x = 3. Solve: x = 3/9. Simplify by GCD(3, 9) = 3 to get 1/3.

How do you convert a mixed number like 1.75 to a fraction?

Treat 1.75 as a terminating decimal with two decimal places. Write it as 175/100, find GCD(175, 100) = 25, and divide: 175 ÷ 25 = 7, 100 ÷ 25 = 4. So 1.75 = 7/4, which as a mixed number is 1 3/4. The key insight is that you do not need to separate the whole number — the method works on the full decimal string.

Why do some fractions produce repeating decimals?

A fraction a/b (in lowest terms) produces a terminating decimal if and only if b has no prime factors other than 2 and 5 — because 10 = 2 × 5 is the base of our decimal system. When b contains any other prime factor (like 3, 7, 11, or 13), the long division will eventually cycle, producing a repeating decimal. The length of the repeating block divides φ(b) by Euler's theorem, which is why 1/7 has a 6-digit repeating block: 142857.

What is 0.1666… as a fraction?

0.1666… can be written as 0.1(6) — one non-repeating digit (1) followed by the repeating digit (6). Using n = 1 and r = 1 in the elimination formula: denominator = 10² − 10¹ = 90, numerator = 0 × 90 + 1 × (10 − 1) + 6 = 15. So x = 15/90. GCD(15, 90) = 15 gives the final answer of 1/6.

Can every decimal be written as a fraction?

Every terminating or repeating decimal is a rational number and can be written as an exact fraction. Irrational numbers like π, √2, and e have decimal expansions that neither terminate nor repeat — they cannot be expressed as exact fractions, only as approximations. However, for any practical calculation you can truncate them to a terminating decimal and convert that to a fraction with any desired precision.