Fraction to Decimal Converter
Use this free fraction to decimal converter to turn any fraction into its exact decimal value. It performs the division digit by digit, detects repeating decimals and marks the repeating digits with an overline, and rounds to the number of decimal places you choose.
Enter your fraction
Type a fraction like 3/8, or fill in the numerator and denominator separately. Results update as you type.
Your results
Enter a fraction and its decimal value will appear here.
How to use this calculator
The quickest way is to type the whole fraction in the top field — something like 3/8 or -7/2 — and the numerator and denominator fields fill in automatically. You can also type the numerator and denominator yourself, or edit them after entering the fraction. Negative fractions work fine; put the minus sign anywhere (3/-8 means the same as -3/8).
Choose how many decimal places you want the rounded value to show (0–12, default 6). The calculator always shows the full expansion too — up to about 12 digits — with repeating digits marked, so the rounded value never hides what's really going on.
If you enter a denominator of zero, or anything that isn't a whole number, the calculator tells you exactly what's wrong instead of guessing. Improper fractions (where the numerator is bigger than the denominator) also get a mixed-number form, like 7/2 = 3 1/2.
How it works
A fraction becomes a decimal through long division: divide the numerator by the denominator. This calculator does exactly that, one digit at a time, using pure integer arithmetic — no floating-point approximations anywhere. It tracks each remainder as it goes: if a remainder of 0 appears, the division ends and the decimal terminates (3/8 = 0.375 exactly).
If a remainder repeats, though, the digits produced between the two occurrences will cycle forever — that block is the repetend. It must repeat eventually, because there are only finitely many possible remainders (fewer than the denominator), so some remainder has to come back. The calculator marks the repeating block with an overline, the standard math notation: 1/3 = 0.3, and 1/6 = 0.16.
Whether a fraction terminates depends only on the simplified denominator's prime factors: if they are just 2s and 5s (as in 1/8 = 0.125), the decimal ends. Any other prime factor — like the 3 in 1/3 — guarantees a repeating decimal. Rounding is done from the exact digit sequence, so even the rounded value of a repeating decimal is correct.
Assumptions: inputs must be whole numbers (integers); the denominator cannot be zero. Results are exact mathematical values, not estimates.
Frequently asked questions
How do I convert a fraction to a decimal?
Divide the numerator by the denominator. For example, 3/8 = 3 ÷ 8 = 0.375. This calculator performs that division for you and detects whether the decimal terminates or repeats.
Why do some fractions have repeating decimals?
When long division never produces a zero remainder, one of the finite possible remainders must eventually appear again — and from that point the digits repeat forever. For example, 1/3 leaves a remainder of 1 at every step, so the digit 3 repeats.
How can I tell if a fraction's decimal terminates?
Simplify the fraction first, then look at the denominator's prime factors. If they are only 2s and 5s (for example 1/8 = 0.125), the decimal terminates. Any other prime factor means it repeats — for example 1/3 = 0.333…
How do you write a repeating decimal with an overline?
The standard notation draws a line over the repeating digits: 1/3 = 0.3̄ (overline over the 3), and 1/6 = 0.16̄ (overline over the 6). This calculator shows the repeating digits with an overline and lists the repeating block separately.