Toolkit
All tools
Fraction desk · Free

Decimal to Fraction Converter

Turn any decimal into an exact fraction in simplest form, with the working shown step by step. Repeating decimals, mixed numbers, the nearest fraction under a denominator limit, and tape-measure sixteenths and sixty-fourths are all covered, and it converts fractions back to decimals too.

Exact BigInt maths in your browser · Nothing uploaded

0.375 is 3/8 in simplest form.

Fraction desk

Type the decimal

Terminating or repeating, positive or negative. Mark a repeat with brackets, or with the control underneath.

Read digit for digit as exact text, never rounded through a floating-point number.

Examples
Repeat the last0digits

Off: the decimal stops where you stopped typing.

Result

0.375 as a fraction

Simplest form
3/8

0.375 = 3/8. Numerator and denominator share no factor but 1.

Mixed number
Proper fraction
Decimal
0.375
Percent
37.5%
Before simplifying
375/1000
Divided by (GCD)
125
Denominator
2³
Decimal type
Terminating
The working

How 0.375 becomes 3/8

A decimal that stops is already a fraction over a power of ten. All that is left is simplifying it.

  1. 01

    Write it over a power of ten

    0.375 = 375/1000

    3 digits sit after the point, so the denominator is 10³, which is 1000. The digits without the point are the numerator.

  2. 02

    Find the greatest common divisor

    1000 = 2 × 375 + 250
    375 = 1 × 250 + 125
    250 = 2 × 125 + 0

    Euclid's method: divide, keep the remainder, repeat. The last non-zero remainder, 125, is the GCD.

  3. 03

    Divide top and bottom by it

    375 ÷ 125 = 3
    1000 ÷ 125 = 8
    375/1000 = 3/8

    Dividing by the GCD gets to simplest form in one step, with no common factor left.

  4. 04

    Answer

    0.375 = 3/8
Reference

Common fractions as decimals

Sixteenths of an inch with their exact millimetres, and the thirds, fifths, and sixths that come up everywhere else. A bar over a digit means it repeats.

Sixteenths of an inch

Each sixteenth of an inch as a decimal and in millimetres
FractionDecimalMillimetres
1/160.06251.5875
1/80.1253.175
3/160.18754.7625
1/40.256.35
5/160.31257.9375
3/80.3759.525
7/160.437511.1125
1/20.512.7
9/160.562514.2875
5/80.62515.875
11/160.687517.4625
3/40.7519.05
13/160.812520.6375
7/80.87522.225
15/160.937523.8125

Thirds, fifths, and sixths

Thirds, fifths, and sixths as decimals and percentages
FractionDecimalPercent
1/30.3, with 3 repeating33.3%, with 3 repeating
2/30.6, with 6 repeating66.6%, with 6 repeating
1/50.220%
2/50.440%
3/50.660%
4/50.880%
1/60.16, with 6 repeating16.6%, with 6 repeating
5/60.83, with 3 repeating83.3%, with 3 repeating

Halves, quarters, and eighths terminate because their denominators are powers of 2. Thirds and sixths repeat because of the factor 3; fifths terminate because 5 divides 10.

Everything here is exact BigInt arithmetic in this tab, and nothing is uploaded. A decimal is read exactly as typed, so 0.333333 converts to 333333/1000000 (one three-millionth short of 1/3) rather than 1/3: mark the 3 as repeating, or use nearest mode, to get the fraction a calculator display was rounding. Input is capped at 60 digits, and nearest mode and the fraction-to-decimal direction accept denominators up to 1,000,000.

How it works

A decimal is already a fraction. It just needs simplifying.

Every decimal that stops is a fraction with a power of ten underneath: three decimal places means thousandths, so 0.375 is 375/1000. Dividing top and bottom by their greatest common divisor gives the simplest form, 3/8. A repeating decimal needs one more move, multiplying by powers of ten and subtracting so the endless tails cancel. A value that needs a friendlier denominator is rounded with continued fractions, or to the nearest mark on a tape measure. All of it is done on whole numbers, digit for digit, so the answer is exact rather than a floating-point near miss.

  1. 01

    Type the decimal, and mark any repeat

    Type it the way you have it: 0.375, .75, -1.125, or 1,234.5. For a decimal that repeats forever, put the repeating digits in brackets, as in 0.(3) or 0.1(6), or type them once and use the repeat control to say how many of the last digits repeat.

  2. 02

    Choose an exact answer or the nearest fraction

    Exact keeps every digit and reduces the fraction to simplest form. Nearest finds the closest fraction whose denominator stays inside a limit you set, from 1 to 1,000,000, or the closest 1/2, 1/4, 1/8, 1/16, 1/32, or 1/64 for a tape measure, and says how far off it is.

  3. 03

    Read the fraction, the mixed number, and the working

    The answer appears as a fraction, a mixed number, and a percentage, each ready to copy. Underneath, the working shows the power of ten, the greatest common divisor, and the division, or the shift-and-subtract method for a repeating decimal. Switch the direction to turn a fraction back into a decimal.

For homework, recipes, and the workshop

Exact answers, honest repeats, and fractions a tape measure understands.

Exact to sixty digits, never through a float

The decimal is read as text and every step is whole-number BigInt arithmetic, so 0.1 is exactly 1/10 and a long value keeps every digit. A converter that goes through a floating-point number can hand back 3602879701896397/36028797018963968 for 0.1, because that is the binary value the computer actually stored.

Repeating decimals, marked the way you write them

Brackets such as 0.(3) and 0.1(6), a pasted overline, or a control that marks the last few digits as repeating. The working uses the classic method: call the number x, multiply by powers of ten until the repeats line up, and subtract so the endless tails cancel.

The nearest fraction under any limit

Best rational approximation by continued fractions, compared exactly rather than by trial and error. The table lists every convergent with its error, so you can see why 3.14159 lands on 355/113 with a limit of 1000 and on 311/99 with a limit of 100.

Fractions a tape measure understands

Inch mode allows only power-of-two denominators, which is how rulers are marked. Pick halves through 64ths and the answer comes back as a mixed number with the error in inches and millimetres, next to the same value at every other precision.

Fraction to decimal, with the cycle found

Type 5/6 or 1 3/8 and get the exact decimal back. The repeating cycle is worked out from the denominator's prime factors and drawn with a bar over it: 5/6 is 0.8333… with the 3 repeating, and 1/7 repeats the six digits 142857.

A warning when a decimal looks rounded

Type 0.333333 and you get 333333/1000000, because that is exactly what was typed. The page says so plainly and offers the repeating reading, 0.(3), which is 1/3, in one click.

Fraction questions

Worked examples, repeating decimals, and inch fractions.

How do I convert a decimal to a fraction by hand?+

Write the digits over a power of ten with as many zeros as there are decimal places, then simplify. For 0.375 that is 375/1000, because there are three decimal places. The greatest common divisor of 375 and 1000 is 125, and dividing both by it gives 3/8. A whole-number part comes along unchanged: 2.75 is 275/100, which simplifies to 11/4, or 2 3/4 as a mixed number.

How do I convert a repeating decimal to a fraction?+

Call the number x and multiply it by powers of ten until two copies have identical tails. For x = 0.1666…, 10x = 1.666… and 100x = 16.666…; subtracting gives 90x = 15, so x = 15/90, which is 1/6. When the repeat starts straight after the point there is a shortcut: put the repeating digits over the same number of nines. 0.272727… is 27/99, which simplifies to 3/11.

What is 0.375 as a fraction?+

0.375 is 3/8. The other eighths are worth knowing too: 0.125 is 1/8, 0.625 is 5/8, and 0.875 is 7/8. A few more that come up often: 0.75 is 3/4, 0.2 is 1/5, 0.6 is 3/5, 0.0625 is 1/16, and 0.8333… (with the 3 repeating) is 5/6.

How do I convert a decimal to a fraction of an inch?+

Keep the whole inches, multiply the decimal part by the precision you want (16 for sixteenths, 64 for sixty-fourths), round to the nearest whole number, and put the result over that precision. For 2.3 inches, 0.3 × 16 = 4.8, which rounds to 5, so 2.3 inches is about 2 5/16 inches. At 64ths, 0.3 × 64 = 19.2 rounds to 19, giving 2 19/64. Simplify when you can: 8/16 is just 1/2.

What is a mixed number?+

A whole number and a proper fraction written together, such as 2 3/4, which means 2 + 3/4. To get one from an improper fraction, divide the numerator by the denominator: the quotient is the whole number and the remainder stays over the denominator. 11 ÷ 4 is 2 remainder 3, so 11/4 is 2 3/4. A negative mixed number such as −2 3/4 means −(2 + 3/4), not −2 + 3/4.

Why is 0.1 exactly 1/10 but 0.333… is 1/3?+

A decimal that stops is a fraction over a power of ten, and only some fractions can be written that way. A fraction in simplest form has a terminating decimal exactly when its denominator has no prime factors other than 2 and 5, the prime factors of 10. Ten qualifies, so 1/10 is 0.1. Three divides no power of ten, so 1/3 can never be written with a finite number of digits, and its decimal repeats forever.

What does simplest form mean?+

A fraction is in simplest form, also called lowest terms, when its numerator and denominator share no common factor other than 1. Dividing both by their greatest common divisor gets there in one step: 6/8 has a GCD of 2, so it simplifies to 3/4. Every fraction has exactly one simplest form with a positive denominator, which is why it is the standard way to state an answer.

Why does 0.333333 not give 1/3?+

Because six threes is a different number from a third. 0.333333 is exactly 333333/1000000, which is one three-millionth less than 1/3. A calculator that shows 0.333333 has rounded 1/3 to fit its display, but the digits alone cannot say so. Mark the repeat as 0.(3), use the repeat control, or switch to nearest mode, and the answer becomes 1/3. The converter offers the repeating reading whenever a typed value ends in a run that looks rounded.

Is 0.999… really equal to 1?+

Yes, exactly. Call it x: then 10x = 9.999…, and subtracting x leaves 9x = 9, so x = 1. Another way to see it: 1/3 is 0.333…, and three times that is 0.999…, which must equal 3/3. Type 0.(9) here and the converter shows 1. Any decimal ending in a repeating 9 is another way of writing a terminating one, so 0.4999… is 0.5.

How does nearest mode choose the fraction?+

It expands the value as a continued fraction, whose successive cut-offs, called convergents, are the best approximations for their size. The answer is the last convergent with a denominator inside your limit or, when it is closer, a semiconvergent: a fraction built from the last two convergents whose denominator lies between the last convergent's and the next one's. With a limit of 1000, 3.14159 gives 355/113, which agrees with pi to six decimal places. Inch mode simply rounds to the nearest mark of the chosen size, and a value exactly halfway rounds away from zero.

More focused tools, ready when you are.

Explore the growing collection for calculations, documents, writing, and everyday work.

Browse all tools