Math

Decimal to Fraction Calculator

Convert a decimal to a simplified fraction, with an optional maximum denominator for approximations. Includes terminating and repeating decimal examples.

Inputs

Results update as you type — essentials first

Saved scenarios

Store input snapshots on this device — load anytime.

No saved scenarios yet.

Formula / how it works

Searches denominators up to maxDen for the closest n/d, then simplifies by gcd. Exact decimals return exact fractions.

Detailed guide

What it is, how to use it, how to read the numbers, common mistakes, a worked example, formulas, and FAQs.

What this calculator is

Many decimals are exact fractions in disguise: 0.375 is 3/8, 0.25 is 1/4. Others, like 0.3333, are approximations of fractions such as 1/3. This calculator converts a decimal to a simplified fraction, reports whether the match is exact, and lets you cap the denominator for a practical approximation, such as the nearest sixteenth in a workshop. Students use it in arithmetic and algebra, carpenters to translate decimals into tape-measure fractions, and cooks to scale recipes. For terminating decimals the answer is exact. For long or repeating decimals, the maximum denominator controls how close the approximation is.

When to use / who it helps

  • You have a decimal and need the fraction form.
  • You want a fraction for a measurement with a maximum denominator, like 16 or 64.
  • You are checking homework on fractions.
  • You are converting a recipe amount.
  • You need to see if a decimal is exact.

How to use

Steps

  1. Enter the decimal value.
  2. Leave the maximum denominator at 10,000 for precision or lower it for practical fractions.
  3. Read the simplified fraction.
  4. Read the mixed number for values above 1.
  5. Check the exact match indicator.
  6. Check the decimal produced by the fraction.

How to interpret results

  • An exact match means the fraction equals the decimal precisely.
  • A non-exact result is the nearest fraction within the denominator limit.
  • Lower limits give simpler fractions but larger errors.
  • Repeating decimals like 0.3333 need a limit to produce 1/3.
  • Floating-point input can show tiny errors, such as 0.1 + 0.2.

Common mistakes & gotchas

  • Typing a rounded decimal and expecting the original fraction.
  • Forgetting to simplify.
  • Expecting an exact result for irrational numbers like π.
  • Using a limit that is too low.
  • Entering percentages.

Worked example

Worked example — 0.375 and 2.75

  1. 0.375 = 375/1,000. The greatest common divisor is 125, so divide: 3/8.
  2. Check: 3 ÷ 8 = 0.375, an exact match.
  3. 2.75 = 275/100 = 11/4, or the mixed number 2 3/4.
  4. 0.3333 with a maximum denominator of 100 would give 1/3 as the nearest simple fraction, which is not exact.

Result: 0.375 is exactly 3/8; 2.75 is 11/4 or 2 3/4.

To load the form's own demo values, tap Try example above the Calculate button.

How to calculate / formula

Searches denominators up to maxDen for the closest n/d, then simplifies by gcd. Exact decimals return exact fractions.

Frequently asked questions

How do I convert a decimal to a fraction?

Write it over a power of ten, then simplify by the greatest common divisor.

What is 0.125 as a fraction?

1/8.

Why isn't 0.3333 exactly 1/3?

0.3333 is a rounded value of 1/3, which is 0.3333… repeating.

What does maximum denominator do?

It limits the approximation to fractions with denominators up to that number.

Can I convert negative decimals?

Yes, the sign applies to the fraction.

Can I convert pi?

Only approximately, since it is irrational. For example 355/113.