Arithmetic & Numbers

Decimal to Fraction Calculator

This decimal to fraction calculator turns any decimal into a fraction in lowest terms and shows the steps: 0.625=6251000=580.625 = \frac{625}{1000} = \frac{5}{8}.

Try
Convert

Repeating digits go in parentheses: 0.(3) means 0.333…, 0.1(6) means 0.1666….

Enter the decimal as
More options Also round to the nearest (inches)

For measurements such as inches: the closest fraction with this denominator, and how far it is from the exact value.

Result

0.625 as a fraction: 5/8

0.625 as a fraction

0.625=580.625 = \frac{5}{8}

Fraction in lowest terms
58\frac{5}{8}
Before simplifying
625/1000
Decimal value
0.625
As a percentage
62.5%

0.625 = 625/1000 = 5/8. 3 decimal places means 1000ths, and dividing the top and bottom by 125 gives lowest terms.

Step-by-step working (3 steps)
  1. Write the decimal over a power of 10

    0.625 has 3 decimal places, so drop the decimal point and put the digits over 1000 (1 followed by 3 zeros).

    x=0.625=6251000x = 0.625 = \frac{625}{1000}
  2. Simplify

    Divide the numerator and denominator by their greatest common divisor, 125.

    x=6251000=58x = \frac{625}{1000} = \frac{5}{8}
  3. Check

    Divide the numerator by the denominator: you get the decimal back.

    5÷8=0.6255 \div 8 = 0.625

Put repeating digits in parentheses, so 0.1(6) gives 16\frac{1}{6}, or switch to fraction to decimal to find where a decimal repeats, as in 512=0.416‾\frac{5}{12} = 0.41\overline{6}.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Choose Decimal → fraction or Fraction → decimal.
  2. Type a decimal such as 0.625 or −2.75. If digits repeat forever, put them in parentheses: 0.(3) means 0.333…, 0.1(6) means 0.1666… and 2.4(18) means 2.41818….
  3. Or, below the box, choose Digit groups and type the whole-number part, the digits that do not repeat, and the digits that repeat in separate boxes.
  4. For a measurement, open More options and pick a denominator such as 1/16 to get the nearest ruler fraction as well as the exact one.
  5. To use it as a fraction to decimal calculator, choose Fraction → decimal and type 5/8, a mixed number such as 1 1/6, or a whole number. Read the answer, then the steps: place value for plain decimals, multiply and subtract for repeating ones, and a long-division table for fractions.

Formulas

Decimal to fraction

x=N10k=N÷g10k÷g,g=gcd(N,10k)x = \frac{N}{10^{k}} = \frac{N \div g}{10^{k} \div g}, \quad g = \gcd(N, 10^{k})

Plain-text formula: x = N/10^k = (N ÷ g)/(10^k ÷ g), g = gcd(N, 10^k)

NN
the digits of the decimal with the point removed
kk
the number of decimal places

Drop the decimal point to get the whole number N, put it over 10 to the power of the number of decimal places, then divide the top and bottom by their greatest common divisor. For 0.625: 6251000\frac{625}{1000}, and gcd(625, 1000) = 125, so x=58x = \frac{5}{8}.

Repeating decimal to fraction

x=N1−N210k+r−10kx = \frac{N_{1} - N_{2}}{10^{k+r} - 10^{k}}

Plain-text formula: x = (N_1 − N_2)/(10^(k + r) − 10^k)

kk
number of decimal digits before the repeating block
rr
number of digits in the repeating block (the period)

N1N_{1} is the number formed by all the digits up to the end of the first repeating block, ignoring the decimal point, and N2N_{2} is the number formed by the digits before the block. For 2.418‾2.4\overline{18}: N1=2418N_{1} = 2418, N2=24N_{2} = 24, k = 1 and r = 2, so x=2394990=13355x = \frac{2394}{990} = \frac{133}{55}.

A block that repeats from the decimal point

0.d1d2⋯dr‾=d1d2…dr10r−10.\overline{d_{1} d_{2} \cdots d_{r}} = \frac{d_{1} d_{2} \ldots d_{r}}{10^{r} - 1}

Plain-text formula: 0.overline(d_1d_2⋯d_r) = (d_1d_2…d_r)/(10^r − 1)

The block over the same number of nines: 0.3‾=39=130.\overline{3} = \frac{3}{9} = \frac{1}{3} and 0.142857‾=142857999999=170.\overline{142857} = \frac{142857}{999999} = \frac{1}{7}.

When a fraction terminates

abterminates⇔b=2m⋅5nin lowest terms\frac{a}{b}\;\text{terminates} \iff b = 2^{m} \cdot 5^{n}\;\text{in lowest terms}

Plain-text formula: a/b terminates ⇔ b = 2^m · 5^n in lowest terms

Otherwise the decimal repeats. The number of digits before the repeat is the larger of m and n, and the period is the smallest r for which 10r−110^{r} - 1 is divisible by the part of b that is not made of 2s and 5s.

Reading the result

The fraction is the exact value of the decimal you typed. A decimal that stops, such as 0.625, always gives a denominator made only of 2s and 5s; a repeating one, such as 0.1(6), gives a denominator with some other factor. The calculator works with whole numbers throughout, so inputs of up to 200 digits are converted exactly, never rounded.

In the fraction to decimal direction, the bar (vinculum) covers the digits that repeat forever: 0.416‾0.41\overline{6} means 0.41666…. In plain text the calculator writes the same number as 0.41(6). The nearest-fraction option is the only place anything is rounded, and it shows how far the rounded fraction is from the exact one.

How to convert a decimal to a fraction

1. Write the decimal over a power of 10. Count the decimal places: one place means tenths, two means hundredths, three means thousandths. 0.75 has two, so 0.75=751000.75 = \frac{75}{100}.

2. Simplify. Divide the top and bottom by their greatest common divisor (GCD). gcd(75, 100) = 25, so 75100=34\frac{75}{100} = \frac{3}{4}. If you cannot spot the GCD, keep dividing by 2 and 5, the only primes in a power of 10.

3. Write a mixed number if the decimal is greater than 1. 1.125=11251000=98=1181.125 = \frac{1125}{1000} = \frac{9}{8} = 1\tfrac{1}{8}. Or convert only the decimal part, 0.125 = 1/8, and keep the 1 in front.

The same steps give 0.045=451000=92000.045 = \frac{45}{1000} = \frac{9}{200} and 2.5=2510=52=2122.5 = \frac{25}{10} = \frac{5}{2} = 2\tfrac{1}{2}. To check, divide the numerator by the denominator: 9 ÷ 8 = 1.125.

Decimal to fraction chart

The decimals people convert most often, with their fractions in lowest terms and as percentages. A bar marks digits that repeat.

Common decimals as fractions and percentages
DecimalFractionPercent
0.051/205%
0.11/1010%
0.1251/812.5%
0.21/520%
0.251/425%
0.33/1030%
0.3‾0.\overline{3}1/333.3‾%33.\overline{3}\%
0.3753/837.5%
0.42/540%
0.51/250%
0.63/560%
0.6255/862.5%
0.6‾0.\overline{6}2/366.6‾%66.\overline{6}\%
0.77/1070%
0.753/475%
0.84/580%
0.8757/887.5%
0.99/1090%

Decimal to fraction in inches

Tape measures and rulers mark inches in halves, quarters, eighths and sixteenths, so a decimal such as 0.3 in has no exact mark. Open More options, choose 1/16, and the calculator gives the nearest sixteenth: 0.3 × 16 = 4.8, which rounds to 5, so 0.3 in ≈ 5/16 in (0.3125 in, 0.0125 in too long). Choose 1/32 or 1/64 for finer work such as machining.

One inch is exactly 25.4 mm, so the millimetre column below is exact.

Sixteenths of an inch as decimals and millimetres
Fraction (in)Decimal (in)Millimetres
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
1125.4

How to convert a repeating decimal to a fraction

Every repeating decimal to fraction conversion uses the same idea. Call the number x. Multiply by a power of 10 that moves the decimal point one full repeating block to the right, and subtract so the endless tails cancel. For 0.8 repeating: 10x=8.8‾10x = 8.\overline{8}, and 10x−x=810x - x = 8, so 9x=89x = 8 and x=89x = \frac{8}{9}.

If some digits come before the repeat, first multiply to move past them. For 0.4777…: 10x=4.7‾10x = 4.\overline{7} and 100x=47.7‾100x = 47.\overline{7}, so 90x=4390x = 43 and x=4390x = \frac{43}{90}. For 2.666…, convert 0.666… = 2/3 and add the 2: 223=832\tfrac{2}{3} = \frac{8}{3}.

Shortcut: when the block starts right after the decimal point, write the block over the same number of nines. 0.27‾=2799=3110.\overline{27} = \frac{27}{99} = \frac{3}{11}. The table lists the repeating decimals that come up most.

Common repeating decimals
FractionDecimalRepeating block
1/30.3‾0.\overline{3}1 digit
2/30.6‾0.\overline{6}1 digit
1/60.16‾0.1\overline{6}1 digit
5/60.83‾0.8\overline{3}1 digit
1/70.142857‾0.\overline{142857}6 digits
1/90.1‾0.\overline{1}1 digit
1/110.09‾0.\overline{09}2 digits
1/120.083‾0.08\overline{3}1 digit
1/130.076923‾0.\overline{076923}6 digits

Fraction to decimal

Switch to Fraction → decimal and this page works as a fraction to decimal calculator. Divide the numerator by the denominator: 14=1÷4=0.25\frac{1}{4} = 1 \div 4 = 0.25 and 58=5÷8=0.625\frac{5}{8} = 5 \div 8 = 0.625. A mixed number such as 2382\tfrac{3}{8} keeps its whole part: 2.375.

Whether the decimal stops depends only on the denominator in lowest terms. If its prime factors are just 2s and 5s, it stops: 3/40 = 0.075. Any other prime makes it repeat: 1/12 = 0.08(3) and 1/7 = 0.(142857). The calculator shows the repeating block, its length, and a long-division table where you can watch a remainder come back.

Common mistakes

Typing 0.333 for one third. 0.333 stops after three digits, so it is exactly 3331000\frac{333}{1000}. Only the repeating decimal 0.(3) equals 13\frac{1}{3}. The calculator warns you when a typed decimal ends in a run of one digit, and the same goes for a rounded display such as 0.6667, which is 6667/10000, not 2/3.

Putting the repeat in the wrong place. 0.1(6) = 0.1666… = 1/6, but 0.(16) = 0.161616… = 16/99. Only the digits that really repeat go in the parentheses.

Stopping before lowest terms. 0.75 = 75/100 is correct but not simplified; divide by the GCD, 25, to get 3/4. The calculator shows the unsimplified fraction too, so you can match a textbook step.

Losing the sign or the whole number. −1.25 = −5/4 = −1 1/4. Convert the decimal part, keep the whole number, and put the minus sign on the whole result.

Is 0.999… really equal to 1?

Yes. With x=0.9‾x = 0.\overline{9}, 10x=9.9‾10x = 9.\overline{9}, and subtracting gives 9x=99x = 9, so x = 1 exactly. Another way to see it: 13=0.3‾\frac{1}{3} = 0.\overline{3}, and three times that is 0.9‾=33=10.\overline{9} = \frac{3}{3} = 1. Every terminating decimal has a twin like this; for example, 0.25 = 0.24(9).

The fraction calculator does arithmetic with the fractions you get here, the GCD calculator finds the greatest common divisor used to simplify, and the guide to fractions and exact results explains how the scientific calculator recognizes repeating decimals.

Worked example

Convert 2.41818… to a fraction

Write 2.4(18), that is 2.41818…, as a fraction in lowest terms.

  1. Let x=2.418‾x = 2.4\overline{18}. One digit (4) does not repeat, and the block 18 has two digits.
  2. Multiply by 10 to move past the non-repeating digit: 10x=24.18‾10x = 24.\overline{18}.
  3. Multiply by 1000 to move one full block further: 1000x=2418.18‾1000x = 2418.\overline{18}.
  4. Subtract so the repeating tails cancel: 1000x−10x=2418−241000x - 10x = 2418 - 24, so 990x=2394990x = 2394.
  5. Divide and simplify by the greatest common divisor, 18: x=2394990=13355x = \frac{2394}{990} = \frac{133}{55}.
  6. Check: 133 ÷ 55 = 2.41818…, the number we started with.

Answer: 2.418‾=13355=223552.4\overline{18} = \frac{133}{55} = 2\tfrac{23}{55}.

Frequently asked questions

How do you convert a decimal to a fraction?

Write the digits over 10, 100, 1000 or whichever power of 10 matches the number of decimal places, then simplify by the greatest common divisor. For 0.625: 625/1000, and dividing both by 125 gives 5/8.

What is 0.333 as a fraction?

If it stops after three digits, 0.333 = 333/1000, which is already in lowest terms. If the 3s go on forever, 0.333… = 1/3. Enter 0.(3) in the calculator for the repeating version.

What is 0.8 repeating as a fraction?

8/9. With x = 0.888…, 10x − x = 8.888… − 0.888… = 8, so 9x = 8 and x = 8/9. Any single repeating digit d gives d/9.

What is 2.666… as a fraction?

8/3, or 2 2/3 as a mixed number. The repeating part 0.666… is 6/9 = 2/3, and 2 + 2/3 = 8/3.

How do I convert a repeating decimal to a fraction?

Multiply by a power of 10 that shifts one full repeating block past the decimal point, subtract the original so the repeating part cancels, then solve. For 0.(3): 10x − x = 3.(3) − 0.(3) = 3, so 9x = 3 and x = 1/3.

How do I convert a fraction to a decimal?

Divide the numerator by the denominator. 1/4 = 1 ÷ 4 = 0.25 and 5/8 = 0.625. If a remainder comes back during the long division, the digits repeat from that point: 1/12 = 0.08(3).

How can I tell whether a fraction will repeat?

Reduce it to lowest terms and factor the denominator. If its only prime factors are 2 and 5 the decimal terminates (3/40 = 0.075); any other prime factor makes it repeat (1/12 = 0.08(3)).

How do I turn a decimal into a fraction of an inch?

Multiply the decimal by 16 (or 8, 32 or 64), round to the nearest whole number, and put it over 16. 0.3 × 16 = 4.8 ≈ 5, so 0.3 in ≈ 5/16 in. The calculator does this under More options and shows the error.

Is 0.999… equal to 1?

Yes, exactly. The algebra gives 9x = 9, so x = 1. Enter 0.(9) to see the steps.

Fraction Calculator

Add, subtract, multiply, divide and simplify fractions and mixed numbers, with every step shown.

Arithmetic & Numbers

LCM and GCF Calculator

LCM and GCF of up to 10 numbers with steps: multiples, prime factors, Euclid’s algorithm and a coprime check.

Number Theory & Bases

Percentage Calculator

Percent of a number, what percent, reverse percentages, change, increase, decrease and difference, with steps.

Arithmetic & Numbers

Sig Fig Calculator

Count and round sig figs, or add, subtract, multiply and divide with the sig fig rules.

Arithmetic & Numbers

Scientific Calculator

Type or tap expressions with exact fractions, memory, variables, constants and complex mode.

Tools

Learn more: Why 0.333… and 1/3 are the same number, and when to keep the fraction: exact vs decimal answers. The scientific calculator converts both ways too, as the fractions manual page shows.

Sources and further reading

  1. Decimals (Chapter 5, Prealgebra 2e) (opens in a new tab), OpenStax, Rice University
  2. An Introduction to the Theory of Numbers (G. H. Hardy and E. M. Wright), Chapter IX: The representation of numbers by decimals, Oxford University Press
  3. Guide for the Use of the International System of Units (SI), NIST Special Publication 811, Appendix B: the inch is exactly 25.4 mm (opens in a new tab), National Institute of Standards and Technology

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?