Calculators

Decimal to Fraction Calculator

Convert a decimal or repeating decimal to a fraction in lowest terms and a mixed number with steps, or find the closest simple fraction.

Loading interactive tool…

Embed this tool on your site

About this tool

The Decimal to Fraction Calculator turns a decimal such as 2.375 into a fraction in lowest terms (19/8) and a mixed number (2 3/8), and lists every step. A terminating decimal is written over a power of 10, here 2375/1000, and then the top and bottom are divided by their greatest common divisor, 125. A repeating decimal, typed as 0.1(6) or with the repeating digits in their own box, is solved with the subtraction method: 100x − 10x = 16.666… − 1.666… = 15, so x = 15/90 = 1/6. Closest fraction mode finds the best fraction whose denominator stays within a limit you choose, using continued fractions, so 3.14159 with a limit of 1000 gives 355/113. Round to nearest 1/N gives the nearest sixteenth, or any step you set, for measurements. The math uses exact big integers. Inputs can have up to 15 digits before and 15 after the decimal point, and everything runs in your browser.

Why use it

  • Converts repeating decimals exactly: 0.(3) becomes 1/3 and 0.1(6) becomes 1/6, not a rounded approximation.

  • Shows the working a teacher expects: the power-of-10 fraction, the GCD and, for repeating decimals, the subtraction method.

  • Closest fraction lists the continued-fraction convergents within your limit and how far each one is from your number.

  • Uses exact whole-number arithmetic, so 15-digit decimals pick up no floating-point error.

  • Free, with no sign-up, and nothing you type leaves your browser.

How to use

  1. Type the decimal, such as 2.375 or -0.75. Put repeating digits in parentheses, as in 0.1(6) for 0.1666…, or type them in the Repeating digits box.
  2. Leave Exact fraction selected to get the fraction in lowest terms and the mixed number.
  3. For a long decimal, choose Closest fraction and enter the largest denominator you will accept, such as 100 or 1000.
  4. For measurements, choose Round to nearest 1/N and set N, for example 16 for sixteenths of an inch.
  5. Read the steps and the check line, then copy the fraction or the mixed number.

When it helps

  • Checking homework that asks for a decimal as a fraction in simplest form.
  • Turning a measurement such as 2.71 inches into the nearest sixteenth, 2 11/16, for a tape measure.
  • Recovering the fraction behind a repeating result such as 0.272727…, which is 3/11.
  • Finding a simple ratio close to a long decimal, such as a gear ratio or a scale factor.

Examples

Terminating decimal

Input

2.375

Expected result

2375/1000 = 19/8 = 2 3/8

Repeating decimal

Input

0.1(6), meaning 0.1666…

Expected result

100x − 10x = 15, so x = 15/90 = 1/6

Closest fraction with a largest denominator of 1000

Input

3.14159

Expected result

355/113, off by 2.92 × 10⁻⁶

Tips

  • Trailing zeros do not change the answer: 0.50 and 0.5 both simplify to 1/2.
  • A calculator that shows 0.6666667 has rounded a repeating decimal. Enter 0.(6) to get exactly 2/3.
  • 0.(9) is exactly 1: the subtraction method gives 9x = 9.
  • A lower denominator limit trades accuracy for simplicity: 3.14159 gives 22/7 with a limit of 10 and 355/113 with a limit of 1000.
  • For drill bits and rulers, use Round to nearest 1/N with N = 16, 32 or 64.

Frequently Asked Questions

How do you convert a decimal to a fraction?
Write the decimal’s digits over 10 raised to the number of decimal places, then simplify. 0.75 has two decimal places, so 0.75 = 75/100. The greatest common divisor of 75 and 100 is 25, which leaves 3/4.
How do you convert a repeating decimal to a fraction?
Call the number x and multiply by powers of 10 until two versions share the same repeating tail. For 0.1666…, 100x = 16.666… and 10x = 1.666…. Subtracting gives 90x = 15, so x = 15/90 = 1/6.
How do I type a repeating decimal?
Put the repeating digits in parentheses after the decimal point: 0.(3) for 0.333…, 0.1(6) for 0.1666… and 1.2(34) for 1.23434…. Or type 0.1 as the decimal and 6 in the Repeating digits box.
What is 0.333 as a fraction?
Exactly 0.333, with three 3s, is 333/1000. If you mean 0.333… with the 3 repeating forever, it is 1/3; enter it as 0.(3).
What does Closest fraction do?
It finds the fraction nearest to your decimal whose denominator does not exceed your limit, using continued fractions. For 3.14159, a limit of 100 gives 311/99 and a limit of 1000 gives 355/113.
How do I convert a decimal to a fraction of an inch?
Choose Round to nearest 1/N and set N to 16, or to 8, 32 or 64. The calculator multiplies by N, rounds to a whole number and simplifies: 0.39 × 16 = 6.24, which rounds to 6, so 0.39 inch is about 6/16 = 3/8 inch.
How is the mixed number found?
Divide the numerator by the denominator. The quotient is the whole part and the remainder stays over the denominator: 19 ÷ 8 = 2 remainder 3, so 19/8 = 2 3/8.
Can I convert negative decimals?
Yes. The minus sign is set aside, the digits are converted and the sign goes back on, so -0.75 = -3/4.
How many digits can I enter?
Up to 15 digits before and 15 digits after the decimal point, counting repeating digits. In that range the math uses exact whole numbers, so there is no rounding error.

Explore the category

Glossary

Greatest common divisor (GCD)
The largest whole number that divides both the numerator and the denominator. Dividing both by it puts a fraction in lowest terms.
Repeating decimal
A decimal in which a block of digits repeats forever, such as 0.142857142857… for 1/7.
Mixed number
A whole number and a proper fraction written together, such as 2 3/8.
Continued fraction
A number written as a whole part plus 1 over another whole part plus 1 over another, and so on. Stopping early gives the best simple approximations, called convergents.
Terminating decimal
A decimal that ends after a finite number of digits, such as 0.375.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities