0.n

Math calculator

Decimal to Fraction Calculator

Convert a terminating decimal, or a repeating decimal, into a reduced fraction and explain the error if you stop early.

Fraction3/4
Mixed number3/4

This conversion is exact for the digits you typed. A repeating decimal such as 0.333… needs Repeating mode, or 0.333333 will stay a long terminating fraction.

Formula0.d₁…dₙ = digits ÷ 10ⁿ, then divide by gcd
Calculation steps
  1. Typed digits convert to 3 / 4 before cancelling common factors is shown as 3/4.
  2. Exact value of this fraction: 0.75

On this device

History and favorites

History and favorites stay in this browser. They are not sent to KE Calculator. At most 20 history items are kept.

Recent results

Copy a result or share URL to save it here.

Favorite calculators

Save a calculator to open it quickly later.

How it works

How to use this decimal to fraction calculator

  1. Use Terminating for a finite decimal you typed in full.
  2. Use Repeating to mark digits that continue forever. Integer part, optional non-repeating digits, and at least one repeating digit.
  3. Read the reduced fraction. Terminating mode warns that a cutoff of 0.333… is not the same as the infinite expansion.

Formula

The calculation formula

0.d₁…dₙ = digits ÷ 10ⁿ
01

For a terminating decimal, write the digits over a power of 10 and cancel the gcd.

02

For a repeating decimal, subtract the non-repeating prefix from the combined block and divide by (10^k − 1) × 10^m.

03

Compare the fraction with a rounded cutoff if you only typed a finite prefix of a repeat.

Worked examples

Example calculations

Terminating decimal

0.75 is 75/100. gcd(75, 100) = 25, so the fraction is 3/4.

Repeating decimal

0.3 repeating is 3/9 = 1/3. 0.16 with 6 repeating is (16 − 1) / 90 = 1/6.

When to use it

Common use cases

  • Turn 0.75 into 3/4
  • Recover 1/3 from 0.3 repeating
  • See why 0.333333 is not exactly 1/3

Limits

Assumptions and limits

  • Terminating mode is exact for the digits entered, up to 12 places after the point.
  • Repeating mode treats the repeating block as infinite, so 0.3̅ is exactly 1/3.
  • A typed prefix such as 0.333333 stays a long terminating fraction unless you switch to Repeating.

Questions

Frequently asked questions

Why is 0.333333 not 1/3?

Those six digits are 333333/1000000, which simplifies but is still short of the infinite 0.3 repeating. Use Repeating mode with repeating digit 3 to get 1/3.

How do you convert 0.16 with 6 repeating?

Non-repeating length m = 1 and period k = 1. (16 − 1) ÷ ((10 − 1) × 10) = 15/90 = 1/6.

Sources

Sources and review