About this tool
Converting a decimal to a fraction means writing the same number as a ratio of two whole numbers. Every terminating decimal, such as 0.75, and every repeating decimal, such as 0.333…, is a rational number with an exact fraction. This calculator finds that fraction in lowest terms, shows it as a mixed number when it is larger than 1 and walks through the algebra, so you can check homework, convert measurements or turn a calculator display back into a fraction.
How it works
Type a decimal such as 0.75 or 2.125. For a repeating decimal, put the repeating block in parentheses: 0.(3) means 0.333… and 0.1(6) means 0.1666… You can also type the digits followed by an ellipsis, or enter a plain decimal and say how many of its last digits repeat.
A terminating decimal becomes a fraction over a power of ten, such as , which is then divided by the greatest common divisor. For a repeating decimal, the calculator multiplies by powers of ten so that the repeating parts line up, subtracts to cancel them and solves for . All arithmetic is exact, so long decimals still give the precise fraction.
Example
Take 0.1(6), that is 0.1666… Let . Multiplying by 100 gives , and multiplying by 10 gives . Subtracting cancels the repeating sixes: , so . Dividing both numbers by their greatest common divisor, 15, leaves .
A terminating decimal is quicker: .
Assumptions and limits
The calculator accepts up to 30 digits. A decimal you type is treated as exact: 0.33 is , not one third, unless you mark the 3 as repeating. When a number ends with an ellipsis, the shortest block that appears at least twice at the end is taken as the repeating part, so type 0.1666… rather than 0.16… Irrational numbers such as π or √2 never repeat and have no exact fraction; entering their first digits gives the fraction of that rounded value only.
Frequently asked questions
How do you convert a repeating decimal to a fraction?
Set equal to the decimal, multiply by 10 raised to the length of the repeating block, and subtract the original. For this gives , so . A purely repeating block of n digits always starts out over n nines before simplifying.
What is 0.333… as a fraction?
Exactly one third: . In the same way, 0.666… is two thirds and 0.111… is one ninth.
Is 0.999… equal to 1?
Yes. With , subtracting gives , so and . The calculator returns 1 for 0.(9) and 2 for 1.(9).
How do I enter 0.1666… where only the 6 repeats?
Type 0.1(6), or type 0.16 and set the repeating digits to 1. Writing 0.(16) would mean 0.161616… instead, which is .
How do you convert a decimal to a mixed number?
Keep the whole-number part and convert only the digits after the decimal point. For 3.75, the decimal part 0.75 is , so . The calculator shows the mixed number automatically whenever the value is larger than 1.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
decimalDecimal | text in the tool's notation, see the examples | required |
repeating_digitsRepeating digits (optional) | whole number; allowed ≥ 0 | optional |
Examples
?decimal=0.375?decimal=2.1(36)?decimal=0.583&repeating_digits=1
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="decimal_to_fraction_calculator"]