What Is a Decimal to Fraction Conversion?
A decimal and a fraction are two notations for one quantity, so the conversion is a rewrite rather than a calculation that loses anything. Every terminating decimal has exactly one fully reduced fraction, and dividing that fraction back out returns the decimal you started with.
Two Notations, One Number
Place value is what makes the rewrite mechanical. The first digit after the point counts tenths, the second hundredths, the third thousandths, each column ten times smaller than the one to its left. Read 0.625 that way and it is six tenths plus two hundredths plus five thousandths, which over a common denominator of 1000 is 600/1000 + 20/1000 + 5/1000 = 625/1000. The shortcut everyone uses skips the addition: three digits after the point, so put all three digits over 1000.
No approximation has happened at that stage. 625/1000 is exactly 0.625, and so is 5/8; reduction changes how the number is written, never its size.
Numerator, Denominator and Lowest Terms
Wolfram MathWorld defines a fraction as a rational number written a/b, where a is the numerator and b the denominator, and a reduced fraction as one with the common terms cancelled out of both. Lowest terms is the state where no whole number above 1 divides the top and the bottom together — the point at which cancelling has nothing left to remove.
- Numerator — the top number, 5 in 5/8. It counts how many parts you have.
- Denominator — the bottom number, 8 in 5/8. It names how many equal parts make one whole.
- Common divisor — any whole number that divides both, such as 5 dividing 625 and 1000.
- Greatest common divisor — the largest of those, 125 for 625 and 1000. One division by it finishes the reduction.
That last point is why the panel prints the divisor instead of hiding it. 625/1000, 125/200, 25/40 and 5/8 are the same number written four ways; only the last is reduced, and the GCD is the single divisor that gets there without cancelling by 5 three times over.
Improper Fraction or Mixed Number
Above 1 there are two correct answers and the panel returns both. 2.75 is 11/4 as an improper fraction — numerator larger than denominator — and 2 3/4 as a mixed number, a whole part with a proper fraction beside it. The two are equal: two wholes is 8/4, and 8/4 + 3/4 = 11/4.
Which form you want depends on the job. Algebra prefers the improper fraction, because it multiplies and divides without a separate whole part to carry. A recipe, a cut list or a tape measure prefers the mixed number, because nobody measures 11/4 inches — they measure 2 3/4.
Where the Question Actually Comes From
This conversion is nearly always the last step of something else:
- A caliper or tape measure is graduated in sixteenths, while the spreadsheet that sized the part says 0.4375. One of the two has to move.
- A recipe halved to 0.375 cup meets a measuring set with no such mark. 3/8 is a quarter plus an eighth, and both of those are marks.
- A drill index and a wrench set are labeled in fractions while the drawing is dimensioned in decimals.
- Homework asks for the working rather than the answer, and the place-value fraction plus the divisor is the working.
- A share or a probability recorded as 0.35 reads better as 7/20 when it has to be said out loud.
Each of those is a rewrite inside one measurement system, which is why an exact conversion matters more than a close one. 0.42 is not 7/16; it is 21/50, and the nearest sixteenth sits 0.0175 inch away.
Rounding, place value and arithmetic on the decimals themselves are a different job, handled by our Decimal Calculator.
How Do You Calculate a Decimal to a Fraction?
Three steps by hand: count the places, write the digits over that power of ten, divide both by their greatest common divisor. The calculator runs the same three and prints the middle one, so the working stays visible.
The Decimal to Fraction Formula
Write d for the decimal and n for how many digits sit after the point.
place-value fraction = (d × 10^n) / 10^n g = GCD(d × 10^n, 10^n) reduced fraction = (d × 10^n ÷ g) / (10^n ÷ g)
The first line always produces a whole numerator, because multiplying by 10^n moves the point past the last digit. The second and third lines are the reduction. For 0.625: n = 3, d × 10³ = 625, 10³ = 1000, g = 125, and the reduced pair is 5 over 8.
The denominator of a reduced terminating decimal can only be built from 2s and 5s, because it has to divide a power of ten and 10 = 2 × 5. MathWorld's entry on regular numbers states the same fact from the other side: a number with a finite decimal expansion can be written p/(2^α5^β). That is why 2, 4, 5, 8, 10, 16, 20, 25, 50 and 100 are the only denominators in the charts below, and 3, 7 and 11 never appear among them.
Step by Step, by Hand
Take 0.35 through the three steps:
- Count the digits after the point. 0.35 has two, so n = 2.
- Drop the point and write those digits as the numerator, giving 35.
- Write 10ⁿ underneath. 10² is 100, so the place-value fraction is 35/100.
- Find the greatest common divisor of 35 and 100. It is 5.
- Divide both by it: 35 ÷ 5 = 7 and 100 ÷ 5 = 20, so the answer is 7/20.
- If the original number was 1 or more, split the whole part off for the mixed form. 0.35 is below 1, so there is nothing to split.
Entering 0.35 in the box returns 7/20 with "From 0.35: 35/100 simplified by GCD 5" underneath — steps three, four and five compressed onto one line.
Finding the Greatest Common Divisor
Step four is the one people skip, and it is the only step that needs a method of its own. Euclid's algorithm is the fast one: divide the larger number by the smaller, keep the remainder, then divide the previous divisor by that remainder, and repeat until a remainder of zero. The last non-zero remainder is the GCD. MathWorld's entry on the Euclidean algorithm describes this loop, and it is what the calculator runs.
GCD(1000, 625) 1000 = 1 × 625 + 375 625 = 1 × 375 + 250 375 = 1 × 250 + 125 250 = 2 × 125 + 0 last non-zero remainder → GCD = 125
Four divisions, no guessing, and the loop stays short. The same procedure on 10000 and 4375 finishes in three lines — 10000 = 2 × 4375 + 1250, then 4375 = 3 × 1250 + 625, then 1250 = 2 × 625 + 0 — producing the 625 that turns 0.4375 into 7/16.
To see that divisor worked out on its own, for any pair of whole numbers, use the GCF Calculator.
Worked Example: 0.4375 From a Caliper
A caliper reads 0.4375 inch and the drill index is labeled in sixteenths. Type 0.4375 and press Calculate.
| Step | Working | Value |
|---|---|---|
| Count the decimal places | four digits sit after the point | n = 4 |
| Write the place-value fraction | the digits over 10⁴ | 4375/10000 |
| Find the GCD | Euclid on 10000 and 4375, three divisions | 625 |
| Divide both by the GCD | 4375 ÷ 625 and 10000 ÷ 625 | 7/16 |
| Mixed number? | the value is below 1, so there is no whole part | none |
On screen the headline reads 7/16 with a single row beneath it: "From 0.4375: 4375/10000 simplified by GCD 625". Two lines in total, because a value below 1 has no mixed form to add.
7/16 is a real drill size, so the reading has landed on a mark rather than between two. Had the caliper said 0.42, the answer would have been 21/50 — a fraction no index carries, and a signal that the part is 0.0175 inch under the nearest sixteenth.
Worked Example: 2.75, a Value Above One
Same machinery, one extra line of output. Type 2.75.
| Step | Working | Value |
|---|---|---|
| Count the decimal places | two digits sit after the point | n = 2 |
| Write the place-value fraction | 275 over 10² | 275/100 |
| Find the GCD | 275 = 2 × 100 + 75; 100 = 1 × 75 + 25; 75 = 3 × 25 + 0 | 25 |
| Divide both by the GCD | 275 ÷ 25 and 100 ÷ 25 | 11/4 |
| Split off the whole part | 11 ÷ 4 = 2 remainder 3 | 2 3/4 |
The panel leads with 11/4, then a labeled row carrying 2 3/4 against the words Mixed number, then "From 2.75: 275/100 simplified by GCD 25". Three lines, and the mixed row appears only when the value is above 1 and does not come out whole.
A negative of the same size behaves identically with the sign carried on the front: -2.75 returns -11/4 and a mixed number of -2 3/4. Its working line prints the unsigned place-value fraction, "From -2.75: 275/100 simplified by GCD 25", because the sign is set aside before the arithmetic and restored afterwards.
Trailing Zeros Change the Working, Not the Answer
The place count comes from the digits you actually typed, so 0.625 and 0.6250 take different routes to the same place. The first starts at 625/1000 and divides by 125. The second starts at 6250/10000 and divides by 1250. Both land on 5/8.
That is worth knowing when the number arrives from a spreadsheet, which pads to a fixed width. 0.62500 reports "From 0.62500: 62500/100000 simplified by GCD 12500" — a divisor ten times larger again, and an unchanged headline. If a working line looks unfamiliar, count the zeros in what was pasted into the box.
Decimal to Fraction Chart
Two charts cover most of what gets looked up: the sixteenths that an imperial tape measure, drill index or wrench set is marked in, and the tenths and hundredths that fall out of percentages and money. Every row is this calculator's own output for that decimal, including the divisor it used.
Inch Fractions: Sixteenths, Eighths and Quarters
Fifteen decimals, from one sixteenth up to fifteen sixteenths. The last two columns are the working the panel prints.
| Decimal | Fraction | Starts as | GCD |
|---|---|---|---|
| 0.0625 | 1/16 | 625/10000 | 625 |
| 0.125 | 1/8 | 125/1000 | 125 |
| 0.1875 | 3/16 | 1875/10000 | 625 |
| 0.25 | 1/4 | 25/100 | 25 |
| 0.3125 | 5/16 | 3125/10000 | 625 |
| 0.375 | 3/8 | 375/1000 | 125 |
| 0.4375 | 7/16 | 4375/10000 | 625 |
| 0.5 | 1/2 | 5/10 | 5 |
| 0.5625 | 9/16 | 5625/10000 | 625 |
| 0.625 | 5/8 | 625/1000 | 125 |
| 0.6875 | 11/16 | 6875/10000 | 625 |
| 0.75 | 3/4 | 75/100 | 25 |
| 0.8125 | 13/16 | 8125/10000 | 625 |
| 0.875 | 7/8 | 875/1000 | 125 |
| 0.9375 | 15/16 | 9375/10000 | 625 |
Only the eight odd sixteenths — 1/16, 3/16, 5/16, 7/16, 9/16, 11/16, 13/16 and 15/16 — stay in sixteenths. The even ones cancel down: 2/16 to 1/8, 4/16 to 1/4, 8/16 to 1/2. That is the long-and-short-mark pattern on a tape measure, and it is also why the chart stops at fifteen rows rather than sixteen. 16/16 is 1, and a whole number comes back as 1/1.
The GCD column says something the fraction alone does not. It is 625 for every odd sixteenth, 125 for every eighth, 25 for the quarters and 5 for the half, because a four-place decimal starts over 10000 while a three-place decimal starts over 1000. A large divisor is a sign of a long decimal, not a complicated fraction.
Everyday Decimals: Tenths, Twentieths and Hundredths
The decimals that come out of percentages, split bills and money.
| Decimal | Fraction | Starts as | GCD |
|---|---|---|---|
| 0.05 | 1/20 | 5/100 | 5 |
| 0.1 | 1/10 | 1/10 | 1 |
| 0.12 | 3/25 | 12/100 | 4 |
| 0.15 | 3/20 | 15/100 | 5 |
| 0.2 | 1/5 | 2/10 | 2 |
| 0.24 | 6/25 | 24/100 | 4 |
| 0.3 | 3/10 | 3/10 | 1 |
| 0.35 | 7/20 | 35/100 | 5 |
| 0.36 | 9/25 | 36/100 | 4 |
| 0.4 | 2/5 | 4/10 | 2 |
| 0.42 | 21/50 | 42/100 | 2 |
| 0.45 | 9/20 | 45/100 | 5 |
| 0.6 | 3/5 | 6/10 | 2 |
| 0.65 | 13/20 | 65/100 | 5 |
| 0.7 | 7/10 | 7/10 | 1 |
| 0.8 | 4/5 | 8/10 | 2 |
| 0.83 | 83/100 | 83/100 | 1 |
| 0.85 | 17/20 | 85/100 | 5 |
| 0.9 | 9/10 | 9/10 | 1 |
| 0.95 | 19/20 | 95/100 | 5 |
A 1 in the GCD column means the decimal was already in lowest terms as written, which is where 0.1, 0.3, 0.7, 0.9 and 0.83 sit: 1, 3, 7 and 9 share no factor with 10, and 83 is prime.
Percentages land in this table constantly. A 5% tax is 1/20, a 15% tip is 3/20, a 35% share is 7/20 — anything ending in 5 becomes twentieths, except 25% and 75%, which reduce further to 1/4 and 3/4.
Why Some Fractions Never Appear in Either Chart
No chart of this kind carries an exact 1/3, 1/6, 1/7, 1/9 or 1/11, and the reason is structural rather than editorial. A fraction has a terminating decimal only when its reduced denominator is built from 2s and 5s — MathWorld's regular numbers, of the form p/(2^α5^β). Three, seven, nine and eleven are not, so their decimals run forever, and no finite decimal in any chart can equal them.
| Fraction | Exact decimal | Typed at 8 places | What the panel returns |
|---|---|---|---|
| 1/3 | 0.333333… | 0.33333333 | 33333333/100000000 |
| 2/3 | 0.666666… | 0.66666667 | 66666667/100000000 |
| 1/6 | 0.166666… | 0.16666667 | 16666667/100000000 |
| 1/7 | 0.142857142857… | 0.14285714 | 7142857/50000000 |
| 1/9 | 0.111111… | 0.11111111 | 11111111/100000000 |
| 1/11 | 0.090909… | 0.09090909 | 9090909/100000000 |
Every entry in the last column is right for the number that was typed and wrong for the fraction it came from. 33333333/100000000 falls short of 1/3 by one part in a hundred million — close, and not equal. Exact conversions for these come from algebra rather than place value, and the repeating-decimal section below works them out.
How to Read Your Result
Two lines come back for a value below 1 and three for a value above it. The headline is always the reduced fraction; everything under it is the working, printed so the answer can be checked rather than taken on trust.
The Lines the Panel Returns
| You type | Headline | First row | Second row |
|---|---|---|---|
| 0.625 | 5/8 | From 0.625: 625/1000 simplified by GCD 125 | — |
| 2.75 | 11/4 | Mixed number → 2 3/4 | From 2.75: 275/100 simplified by GCD 25 |
| -2.75 | -11/4 | Mixed number → -2 3/4 | From -2.75: 275/100 simplified by GCD 25 |
| -0.35 | -7/20 | From -0.35: 35/100 simplified by GCD 5 | — |
| 4 | 4/1 | 4 is a whole number | — |
On the mixed-number row the label sits to the left and the number to the right, the way the panel lays out any labeled value. The working row prints as one unbroken line. A Copy result button below the rows puts the headline and every row on the clipboard together.
What the Working Line Is For
"From 0.625: 625/1000 simplified by GCD 125" is three facts in sequence: the number as it was read, the place-value fraction before any reduction, and the divisor that took it to lowest terms. Together they are the working a teacher asks for, and they are also a self-check — multiply the headline back up by the divisor and the place-value fraction should reappear. Here 5 × 125 = 625 and 8 × 125 = 1000.
A divisor of 1 means the place-value fraction was already reduced, so the headline matches the fraction beside it, as it does for 0.7 with "From 0.7: 7/10 simplified by GCD 1". A very large divisor usually reflects a long decimal: 0.15625 reports a GCD of 3125 and reduces to 5/32.
The Mixed-Number Row
This row shows up only when the value is 1 or more and does not come out whole. 1.5 gets one, returning 3/2 with 1 1/2 beside it. 0.75 does not, having no whole part. Nor does 4, which is reported as 4/1 with the note "4 is a whole number" and no working line at all, since a whole number has nothing to reduce.
Reading a mixed number back is division with a remainder: 11/4 is 11 ÷ 4 = 2 remainder 3, so two wholes and three quarters. Going the other way, multiply the whole part by the denominator and add the numerator — 2 × 4 + 3 = 11.
The Messages That Replace an Answer
Three situations produce an amber notice instead of a fraction.
| What happened | What appears |
|---|---|
| Calculate was pressed with the box empty | Enter a value for Decimal Number. |
| The number carries nine or more decimal places | Use 8 decimal places or fewer |
| The formula received nothing it could read as a number | Enter a decimal number |
The first is caught before the formula runs, by the form's own check on its one required field. The second is the formula's limit and is easiest to hit by pasting: 0.123456789 is refused, while 0.12345678 converts and returns 6172839/50000000. The third is the formula's fallback, and it is rare in practice because the box is a number field.
The panel starts empty rather than showing a worked example, because the box starts blank. Nothing is computed until Calculate is pressed, and pressing it again is what refreshes the answer after a change — typing alone does not.
Repeating Decimals: Why 0.333 Is Not 1/3
MathWorld puts the split plainly: every rational number has either a finite decimal expansion or a repeating one, while an irrational number such as π neither terminates nor becomes periodic. Place value handles the first kind. The second needs a few lines of algebra, which give an exact answer rather than a close one.
The Algebra That Cancels the Repeat
Set x equal to the repeating decimal, multiply by a power of ten large enough to shift exactly one repeating block past the point, then subtract the original equation from the shifted one. The infinite tails are identical, so they cancel and leave whole numbers on both sides.
x = 0.333… 10x = 3.333… 10x − x = 3.333… − 0.333… 9x = 3 x = 3/9 = 1/3
One repeating digit, so multiplying by 10 leaves 9x after the subtraction. Two repeating digits need 100: from x = 0.727272… comes 100x = 72.727272…, then 99x = 72, so x = 72/99 = 8/11.
The Nines Shortcut
That subtraction always leaves the same shape, so it can be skipped. A decimal repeating from the first digit after the point equals its repeating block over as many 9s as the block has digits, then reduced.
| Repeating decimal | Block | Over nines | Reduced |
|---|---|---|---|
| 0.333… | 3 | 3/9 | 1/3 |
| 0.666… | 6 | 6/9 | 2/3 |
| 0.111… | 1 | 1/9 | 1/9 |
| 0.272727… | 27 | 27/99 | 3/11 |
| 0.727272… | 72 | 72/99 | 8/11 |
| 0.142857142857… | 142857 | 142857/999999 | 1/7 |
| 0.999… | 9 | 9/9 | 1 |
The 1/7 row is the shortcut at full stretch: 142857 × 7 = 999999 exactly, which is why the six-digit block divides out so cleanly. The last row is not a trick either. 0.999… and 1 are two decimal expansions of one number, and the algebra shows it without special pleading — x = 0.999…, 10x = 9.999…, 9x = 9, x = 1.
When the Repeat Starts Late
Some decimals have a settling-in digit before the repeat begins; 0.1666… is one, and 0.8333… is another. Shift twice instead of once — multiply by 10 to clear the non-repeating digit, multiply again to move one repeating block, then subtract.
x = 0.1666… 10x = 1.666… 100x = 16.66… 100x − 10x = 16.66… − 1.666… 90x = 15 x = 15/90 = 1/6
In general: take every digit up to the end of the first repeat, subtract the non-repeating part, and put that over as many 9s as there are repeating digits followed by as many 0s as there are non-repeating ones. For 0.1666… that reads (16 − 1)/90 = 15/90 = 1/6 — the same arithmetic in a single step.
What Happens If You Type a Repeat Into This Calculator
It converts the number you typed, exactly, and that number is not the repeat. 0.33333333 comes back as 33333333/100000000, and no rounding step turns that into 1/3 — nor should one, because 33333333/100000000 is the honest answer for those eight digits. The same holds for 0.16666667, which returns 16666667/100000000 rather than 1/6.
So the algebra above is the tool for a repeat, and this page's calculator is the tool for a decimal that stops. When a value arrives from a division — a measurement, a share, a probability — check whether the division actually terminated before treating the printed digits as the whole number.
Once a value is a fraction, adding, subtracting, multiplying or dividing it is the job of our Fraction Calculator.
Limits: Where the Place-Value Method Stops
The conversion is exact inside its range, and the range has edges worth knowing before an answer is trusted.
- Eight decimal places, no more. A ninth digit returns "Use 8 decimal places or fewer" in place of a fraction — 0.12345678 is accepted and gives 6172839/50000000, while 0.123456789 is not.
- A repeating decimal is not recognized as one. The calculator sees the digits in the box and nothing else, so a rounded repeat converts to the rounded value's fraction.
- An irrational number has no fraction at all. Typing 3.14159265 returns 62831853/20000000 with a mixed number of 3 2831853/20000000 — exact for those nine digits, and only an approximation of π.
- Trailing zeros are counted. 0.625 and 0.62500 both give 5/8, by way of different place-value fractions and different divisors.
- It converts rather than measures. There is no snapping to the nearest sixteenth or thirty-second, so 0.42 comes back as 21/50 and stays there.
- A whole number is reported over 1 with no reduction line, because 4/1 has nothing to divide out.
- One number at a time. There is no second box, so comparing two conversions means running the tool twice.
None of that is a rounding weakness in the arithmetic. Within eight places the conversion is exact: the numerator is a whole number by construction, the divisor is the true greatest common divisor, and both divisions come out whole with no remainder to discard.
The cheapest check on any answer here is the division that reverses it. 5 ÷ 8 = 0.625, 7 ÷ 16 = 0.4375, 21 ÷ 50 = 0.42. If the fraction divides back to the decimal you started with, the conversion is right.