Skip to content
Free math tool

Decimal to fraction

Turn a decimal such as 0.125 into an exact fraction such as 1/8. It is useful for measurements, recipes and math homework where a fraction is easier to read than a long decimal.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result
Private: runs on this device

Input

5 characters

Result

Exact fraction: 1/8

Example

Input
0.125
Result
Exact fraction: 1/8

How to use the decimal to fraction

  1. Type a decimal in the box, such as 0.125 or -2.75.
  2. You can also use e notation, such as 2.5e-3.
  3. Press Run to see the exact fraction.
  4. Press Copy result or Download to save it.

How it works

The decimal is written over a power of ten and reduced to lowest terms. 0.125 is 125/1000, which simplifies to 1/8.

The answer is always exact. A whole-number result appears with no denominator, such as 3.

Only decimals that end are supported. Typing 0.333 gives 333/1000, not 1/3, because the tool cannot know the digits were meant to repeat.

Use at most 80 digits and an exponent from -100 to 100. Fractions, commas and text are rejected.

Results are improper fractions, so 2.75 shows as 11/4 rather than a mixed number.

Everything runs in your browser. Your input is not uploaded or stored.

Questions and answers

How do you convert a decimal to a fraction?

Write the digits over 10, 100, 1000 and so on, matching the number of decimal places, then simplify. 0.75 is 75/100, which reduces to 3/4.

What is 0.375 as a fraction?

0.375 is 375/1000, which simplifies to 3/8.

How do I convert a repeating decimal like 0.333...?

This tool only handles decimals that end. A repeating decimal needs a bit of algebra, which shows 0.333... equals 1/3. Typing 0.333 here gives exactly 333/1000.

Can it show a mixed number?

No. The result is an improper fraction, such as 11/4. Divide to get the mixed form: 11/4 is 2 and 3/4.

All 220 SnowRock tools