Decimal to Fraction Calculator
Convert any decimal to a simplified fraction and mixed number
½ Enter a decimal
Leave blank for a normal (terminating) decimal. For a repeating decimal, type the non-repeating part in the field above and the repeating block here. Example: 0.16 → decimal 0.1, repeating 6.
🟰 Result
📋 Step by step
- 1Write as a fraction over a power of 100.75 = 75 / 100
- 2Divide top and bottom by GCD (25)75 / 100 ÷ 25 = 3 / 4
Exact conversion using greatest-common-divisor reduction. Repeating decimals are handled algebraically, so 0.333… returns exactly 1/3 rather than a rounded approximation.
Last updated June 2026
Method: Terminating decimals are written over a power of 10 and reduced by their greatest common divisor (GCD). Repeating decimals are converted exactly using the standard algebraic "shift and subtract" method, so 0.333… returns 1/3, not a rounded value.
Included: Simplified (lowest-terms) fraction, improper and mixed-number forms, negative values and whole numbers, repeating-decimal support, and a step-by-step breakdown.
Not included: Irrational numbers such as π or √2 (which have no exact fraction) and rounding of non-repeating, non-terminating inputs. Enter a finite or clearly repeating decimal for an exact result.
Decimal to fraction calculator: how it works
Every terminating decimal is just a fraction in disguise. The number 0.75 means "75 hundredths," which is 75/100, and once you cancel the common factor of 25 from the top and bottom, it becomes the familiar 3/4. This decimal to fraction calculator does that work for you in one step: it rewrites the decimal as a fraction over a power of 10, reduces it to lowest terms, and also gives you the mixed-number form. It even handles repeating decimals like 0.333…, returning the exact value 1/3 instead of an approximation.
The formula
For a terminating decimal with k digits after the point, the conversion is simply:
fraction = (all the digits) ÷ 10k, then divide top & bottom by GCD For a repeating decimal, the "shift and subtract" identity gives an exact fraction. If the repeating block has q digits and there are p non-repeating digits after the point:
x = (digits through one cycle − non-repeating digits) ÷ ((10q − 1) × 10p) The denominator 10q − 1 is just a string of q nines (9, 99, 999, …), which is why one-digit repeats land over 9, two-digit repeats over 99, and so on.
A worked example: 0.625
Take 0.625. It has three decimal places, so we write it over 103 = 1000:
- 0.625 = 625 / 1000
- The greatest common divisor of 625 and 1000 is 125.
- 625 ÷ 125 = 5 and 1000 ÷ 125 = 8, so 0.625 = 5/8.
Because 8 has only the prime factor 2, this fraction terminates as a decimal - which is why 0.625 was a clean decimal in the first place.
A repeating example: 0.1666…
Now take 0.1666…, where only the 6 repeats. The non-repeating part is 0.1 (one digit, p = 1) and the repeating block is 6 (one digit, q = 1):
- Digits through one cycle: 16. Non-repeating digits: 1.
- Numerator = 16 − 1 = 15.
- Denominator = (101 − 1) × 101 = 9 × 10 = 90.
- 15/90 reduces by GCD 15 to 1/6.
So 0.1666… = 1/6 exactly. To get this in the calculator, enter 0.1 in the decimal field and 6 in the repeating field.
How to use this calculator
- Type the decimal in the first field - for example 0.75, 2.5, or -3.14. You can include a leading minus sign.
- Add repeating digits only if your number repeats forever. Put the non-repeating part in the decimal field and the block that repeats in the repeating field.
- Read the result. The large number at the top is the simplified fraction (or whole number). Below it you get the improper fraction and the mixed number.
- Check the steps. The step-by-step card shows the power-of-10 setup, the GCD, and the reduction, so you can follow or copy the work.
The result updates instantly as you type - no button to press.
Who this calculator is for
- Students checking homework or studying for a test on fractions and decimals.
- Parents and tutors who want to show the work, not just the answer.
- Cooks and bakers converting a decimal measurement (0.25 cup) back into a fraction.
- Woodworkers and DIYers turning a digital readout like 0.375 in. into 3/8 in.
- Anyone who finds fractions easier to picture than decimals.
Common decimal-to-fraction conversions
Many everyday decimals map to simple fractions worth memorizing. Here is a quick reference:
| Decimal | Fraction | Decimal | Fraction |
|---|---|---|---|
| 0.1 | 1/10 | 0.5 | 1/2 |
| 0.125 | 1/8 | 0.6 | 3/5 |
| 0.2 | 1/5 | 0.625 | 5/8 |
| 0.25 | 1/4 | 0.75 | 3/4 |
| 0.333… | 1/3 | 0.8 | 4/5 |
| 0.375 | 3/8 | 0.875 | 7/8 |
| 0.4 | 2/5 | 0.666… | 2/3 |
The 0.333… and 0.666… rows are repeating decimals - notice they map to thirds, whose denominator (3) is not built only from 2s and 5s.
A third example: a mixed number from 2.5
Decimals greater than 1 produce an improper fraction that you can rewrite as a mixed number. Take 2.5:
- 2.5 = 25/10, which reduces by GCD 5 to 5/2.
- 5 ÷ 2 = 2 with remainder 1, so the mixed number is 2 1/2.
The calculator shows both 5/2 and 2 1/2 so you can use whichever form your problem needs.
Key terms explained
- Numerator: the top number of a fraction (how many parts you have).
- Denominator: the bottom number (how many equal parts make a whole).
- Greatest common divisor (GCD): the largest whole number that divides both numerator and denominator. Dividing by it puts the fraction in lowest terms.
- Proper vs. improper fraction: a proper fraction is less than 1 (3/4); an improper fraction is 1 or more (5/2).
- Mixed number: a whole number plus a proper fraction, like 2 1/2, equal to the improper fraction 5/2.
- Terminating vs. repeating decimal: a terminating decimal ends (0.25); a repeating decimal has a block that goes on forever (0.333…).
Why some fractions repeat and others don't
A fraction in lowest terms becomes a terminating decimal only when its denominator's prime factors are nothing but 2s and 5s - the building blocks of our base-10 system. So 1/8 (denominator 2×2×2) terminates as 0.125, and 7/20 terminates because 20 = 2×2×5. But 1/3, 1/6, and 1/7 have denominators with other primes, so they repeat forever. This is the deep reason 0.333… can only be written exactly as 1/3, never as a finite decimal.
Tips for converting by hand
- Count the decimal places to pick the denominator: one place is /10, two is /100, three is /1000.
- Reduce in stages if the GCD is hard to spot - cancel an obvious factor of 2 or 5 first, then look again.
- For repeats, count the repeating digits to know how many 9s go in the denominator: one digit over 9, two over 99, three over 999.
- Memorize the eighths and thirds - they cover most real-world decimals you'll meet.
Decimals to fractions of an inch
One of the most common real-world uses is reading a digital caliper or tape measure that shows decimals and converting back to the fractional marks on a ruler. Standard rulers divide the inch into sixteenths, so it helps to round a decimal to the nearest sixteenth and then simplify. For example, 0.1875 in. is exactly 3/16 in., while a caliper reading of 0.51 in. is closest to 8/16 = 1/2 in. Here is a reference for the sixteenths most often stamped on tools:
| Decimal (in.) | Fraction | Decimal (in.) | Fraction |
|---|---|---|---|
| 0.0625 | 1/16 | 0.5625 | 9/16 |
| 0.125 | 1/8 | 0.625 | 5/8 |
| 0.1875 | 3/16 | 0.6875 | 11/16 |
| 0.25 | 1/4 | 0.75 | 3/4 |
| 0.3125 | 5/16 | 0.8125 | 13/16 |
| 0.375 | 3/8 | 0.875 | 7/8 |
| 0.4375 | 7/16 | 0.9375 | 15/16 |
| 0.5 | 1/2 | 1.0 | 1 |
If your reading lands between two of these values, it is not an exact sixteenth - pick the nearer mark for a measurement, or enter the full decimal here to see the exact fraction it represents. For finer work, the same idea extends to 32nds and 64ths by doubling the denominator at each step.
The method recap, in four moves
If you want to do this on paper, the whole process compresses into four reliable moves that work for any terminating decimal:
- Drop the point and write the number over 1. Treat 0.45 as the integer 45 sitting above a 1.
- Multiply top and bottom by a power of 10. One decimal place means ×10, two means ×100, and so on - here 45/1 becomes 45/100.
- Find the GCD of the new numerator and denominator. For 45 and 100, the GCD is 5.
- Divide both by the GCD to land in lowest terms: 45/100 = 9/20.
For a repeating decimal, swap moves one and two for the "shift and subtract" step - multiply by the power of 10 that lines up the repeating block, subtract the original, and solve for x - then finish with the same GCD reduction. The calculator follows exactly these moves and prints each one in the step-by-step card so you can check your own work.
Accuracy, rounding, and what "exact" means
The result is exact for the digits you type. If you enter 0.333, you get 333/1000, because that is precisely the number you wrote; if you instead mark the 3 as repeating, you get 1/3, the true value the digits are approaching. This distinction matters in school and in engineering: a measurement rounded to three places is an approximation, and converting it produces an approximate fraction, while a known repeating decimal converts to its exact rational form. When you are unsure whether a decimal terminates or repeats, divide the suspected fraction back out - if the digits eventually cycle, mark the cycle as repeating to recover the exact fraction.
Related concepts
Decimal-to-fraction conversion sits next to several other everyday math tasks. To turn a fraction or decimal into a percent (0.75 = 75%), reach for the Percentage Calculator. To add, subtract, or multiply fractions once you have them, use the Fraction Calculator. To simplify or scale ratios like 2:3, the Ratio Calculator handles the same GCD reduction applied to two numbers. And for very large or very small decimals, the Scientific Calculator keeps the precision you need.
⚠️ Common mistakes & edge cases
Forgetting to simplify
Writing 0.75 as 75/100 is correct but not finished. The expected answer is almost always the lowest-terms fraction, 3/4. Always divide the numerator and denominator by their greatest common divisor.
Miscounting decimal places
The denominator's power of 10 must match the number of digits after the point. 0.6 is 6/10, but 0.06 is 6/100 - a tenfold difference. Count carefully, especially with leading zeros.
Rounding a repeating decimal
Treating 0.333… as 0.333 gives 333/1000, which is close but wrong - the exact answer is 1/3. Use the repeating field so the algebraic method produces the precise fraction.
Trying to convert an irrational number
Numbers like π = 3.14159… or √2 never terminate and never repeat, so no exact fraction exists. Values like 22/7 are only approximations of π, not equal to it.
❓ Frequently asked questions
How do you convert a decimal to a fraction?
For a terminating decimal, write the digits over a power of 10 based on how many decimal places there are, then simplify. For example, 0.75 = 75/100, and dividing top and bottom by their greatest common divisor (25) gives 3/4. The calculator does this reduction automatically and also shows the mixed-number form.
How do you turn a repeating decimal into a fraction?
Use the algebraic method: set x equal to the decimal, multiply by a power of 10 to line up the repeating block, then subtract to cancel the repeat. For 0.333…, let x = 0.333…, then 10x = 3.333…, so 10x - x = 3, giving 9x = 3 and x = 3/9 = 1/3. In this tool, type the non-repeating part in the decimal field and the repeating digits in the repeating field.
What is 0.625 as a fraction?
0.625 has three decimal places, so it is 625/1000. The greatest common divisor of 625 and 1000 is 125, and dividing both by 125 gives 5/8. So 0.625 = 5/8.
What is 0.5 as a fraction?
0.5 is 5/10, and dividing top and bottom by 5 gives 1/2. Many common decimals map to simple fractions: 0.25 = 1/4, 0.2 = 1/5, 0.125 = 1/8, and 0.1 = 1/10.
What is a mixed number and when do I use it?
A mixed number combines a whole number with a proper fraction, like 2 1/2. Any improper fraction (where the numerator is larger than the denominator) can be written as a mixed number. For example, 2.5 = 5/2 = 2 1/2. The calculator shows both the improper fraction and the mixed number.
Does the calculator always give the simplest fraction?
Yes. After writing the decimal as a fraction, it divides the numerator and denominator by their greatest common divisor (GCD), which guarantees the result is in lowest terms - the smallest whole-number numerator and denominator that represent the same value.
How do I enter a repeating decimal correctly?
Split the number into its non-repeating and repeating parts. For 0.1666…, the non-repeating part is 0.1 and the repeating block is 6, so enter 0.1 in the decimal field and 6 in the repeating field. For 0.142857142857…, enter 0. as the decimal and 142857 as the repeating block.
Can it handle negative decimals and whole numbers?
Yes. Negative values like -3.14 keep their sign on the resulting fraction. A whole number such as 4 simply returns 4/1, and a value like 2.5 returns the improper fraction 5/2 alongside the mixed number 2 1/2.
Why is 0.999… equal to 1?
Because 0.999… is a repeating decimal: let x = 0.999…, then 10x = 9.999…, so 10x - x = 9, giving 9x = 9 and x = 1. It is a well-known result that 0.999… and 1 are exactly the same number, just written two different ways.
What is the difference between a terminating and a repeating decimal?
A terminating decimal ends after a finite number of digits, like 0.25 or 0.625. A repeating decimal has a block of digits that repeats forever, like 0.333… or 0.142857…. A fraction in lowest terms produces a terminating decimal only when its denominator's prime factors are just 2s and 5s; otherwise the decimal repeats.
💡 Good to know
The denominator tells you the decimal places
A decimal with k digits after the point starts as a fraction over 10k: tenths over 10, hundredths over 100, thousandths over 1000. Counting the places is the whole trick before you simplify.
Repeating blocks live over nines
A single repeating digit goes over 9 (0.444… = 4/9), two repeating digits over 99 (0.0707… = 7/99), three over 999, and so on. Any non-repeating digits up front add a factor of 10 to the denominator.
Only 2s and 5s terminate
A reduced fraction gives a clean, terminating decimal exactly when its denominator factors into only 2s and 5s. That is why halves, quarters, fifths, and eighths are tidy, while thirds and sevenths repeat forever.
Related Calculators
Percentage Calculator
Solve any percentage problem - what is X% of Y and more
Fraction Calculator
Add, subtract, multiply and divide fractions
Scientific Calculator
A full scientific calculator with trig, logs and more
Average Calculator
Calculate the mean, median and mode of numbers
GPA Calculator
Calculate your grade point average (weighted or unweighted)
Ratio Calculator
Simplify, scale and solve ratios and proportions