Decimal to Fraction Calculator
Convert any decimal into a reduced fraction or mixed number. Choose terminating, repeating, or precision-rounding mode, or flip to fraction-to-decimal mode. Every result includes the show-your-work steps so you can see exactly how the math unfolds.
Formula
Worked example
Terminating: 0.75 has two decimal places, so write it as 75/100. The GCD of 75 and 100 is 25, so 75/25 = 3 and 100/25 = 4, giving 3/4. Repeating: 0.666... has 1 repeating digit, so 10x - x = 6.666... - 0.666... = 6, thus 9x = 6, x = 6/9 = 2/3.
How to convert a terminating decimal to a fraction
Every terminating decimal can be written as a fraction over a power of ten. Count the digits after the decimal point: one digit means denominator 10, two digits means 100, three digits means 1000, and so on. Place the digits over that power of ten, then reduce the fraction to its simplest form by dividing the numerator and denominator by their greatest common divisor (GCD). For example, 0.625 becomes 625/1000. The GCD of 625 and 1000 is 125, so dividing both gives 5/8. The result is called a fraction in lowest terms, or a simplified fraction.
How to convert a repeating decimal to a fraction
A repeating decimal like 0.333... or 0.142857... cannot simply be placed over a power of ten, but algebra removes the infinite tail. Let x equal the repeating decimal. Identify how many digits repeat (call that r) and how many non-repeating decimal places come before the repeating block (call that p). Multiply x by 10^(p+r) and also by 10^p. When you subtract the two equations, the repeating tails cancel and you are left with an integer numerator and an integer denominator. Simplify the resulting fraction by the GCD. Example: for 0.666..., r = 1 and p = 0, so 10x - x = 6.666... - 0.666... = 6, giving 9x = 6, so x = 2/3.
Precision rounding to the nearest common fraction
In woodworking, machining, and everyday measurement, the result must land on a standard fraction such as 1/8, 1/16, or 1/32 of an inch. Precision rounding works by multiplying the decimal by the chosen denominator, rounding to the nearest whole number, and then simplifying. For example, rounding 0.318 to the nearest 1/16: 0.318 times 16 is 5.088, which rounds to 5, giving 5/16. This is the mode to use when you need a fraction your ruler or set of calipers can actually measure, rather than an exact mathematical equivalent.
Fraction to decimal (reverse mode)
Switch to reverse mode to go the other direction: enter any numerator and denominator and the calculator returns the decimal, the reduced fraction, and whether the result is a terminating or repeating decimal. A fraction reduces to a terminating decimal only when the denominator (after simplification) has no prime factors other than 2 and 5. Any other prime factor (3, 7, 11, ...) in the denominator produces a repeating decimal. For example, 1/4 = 0.25 (terminating), while 1/3 = 0.333... (repeating, because 3 is a prime factor of the denominator).
Common decimal-to-fraction conversions
| Decimal | Over a power of ten (or by algebra) | Simplified fraction | Mixed number |
|---|---|---|---|
| 0.1 | 1/10 | 1/10 | 1/10 |
| 0.2 | 2/10 | 1/5 | 1/5 |
| 0.25 | 25/100 | 1/4 | 1/4 |
| 0.333... | (10x-x=3) | 1/3 | 1/3 |
| 0.5 | 5/10 | 1/2 | 1/2 |
| 0.666... | (10x-x=6) | 2/3 | 2/3 |
| 0.75 | 75/100 | 3/4 | 3/4 |
| 0.125 | 125/1000 | 1/8 | 1/8 |
| 0.375 | 375/1000 | 3/8 | 3/8 |
| 0.625 | 625/1000 | 5/8 | 5/8 |
| 0.875 | 875/1000 | 7/8 | 7/8 |
| 1.5 | 15/10 | 3/2 | 1 1/2 |
| 2.75 | 275/100 | 11/4 | 2 3/4 |
| 0.142857... | algebra (7x) | 1/7 | 1/7 |
Frequently used terminating and repeating decimals and their exact simplified fractions.
Frequently asked questions
How do I convert a terminating decimal to a fraction by hand?
Write the decimal digits (without the decimal point) as the numerator, and use a power of ten equal to the number of decimal places as the denominator. Then divide both by their greatest common divisor. For example, 0.4 is 4/10, and since gcd(4, 10) = 2, the result is 2/5.
How do I convert a repeating decimal to a fraction?
Let x equal the repeating decimal. If r digits repeat, multiply x by 10^r and subtract x from the result to cancel the repeating tail. Solve for x and reduce. For 0.333...: 10x = 3.333..., so 10x - x = 3, giving 9x = 3, and x = 1/3.
What is the difference between a mixed number and an improper fraction?
An improper fraction has a numerator larger than its denominator, like 7/4. A mixed number rewrites that as a whole part plus a proper fraction: 1 3/4. Both represent the same value. The mixed form is usually easier to read for amounts greater than one.
Can every decimal be written as an exact fraction?
Every terminating or repeating decimal is a rational number and can be written as an exact fraction. Only non-repeating, non-terminating decimals, such as pi or the square root of 2, cannot be expressed as exact fractions. This calculator handles both terminating and repeating decimals exactly.
What does rounding to the nearest 1/16 mean?
It means you want the fraction whose denominator is 16 (or a factor of 16) that is closest to your decimal. For example, 0.318 rounded to the nearest 1/16 is 5/16 (0.3125), because 5/16 is closer to 0.318 than 4/16 (0.25) or 6/16 (0.375). This is useful in carpentry and engineering where only standard fractional increments are practical.
When does a fraction produce a terminating versus a repeating decimal?
A fraction in lowest terms produces a terminating decimal if and only if the denominator has no prime factors other than 2 and 5. Denominators like 2, 4, 5, 8, 10, 16, 20, 25 all give terminating decimals. Denominators like 3, 6, 7, 9, 11, 12 give repeating decimals because they contain prime factors other than 2 and 5.