Skip to content
QueenNexa

Free tool

Decimal to Fraction Calculator

Convert any decimal to a simplified fraction or mixed number, including repeating decimals such as 0.(3). Exact results, with the working shown.

For a repeating decimal, put the repeating digits in parentheses: 0.(3) or 0.1(6).

Simplified fraction
–
Mixed number
–
Before simplifying
–
As a percent
–
Note
–

The working

    Assumptions and limits

    Every figure comes from the numbers you enter. Where a rule of thumb is used, it is labeled as one.

    • A terminating decimal with k digits after the point equals the digits written as a whole number over 10^k, reduced by the greatest common factor.
    • A repeating decimal is entered with the repeating digits in parentheses. With k non-repeating digits and a repeating block of r digits, the fraction is (all digits − non-repeating digits) ÷ (10^k × (10^r − 1)).
    • A decimal you type without parentheses is treated as exact. 0.333 is 333/1000, never 1/3.
    • Exact whole-number arithmetic with no rounding, up to 60 digits in total.
    • The percent line multiplies the value by 100 and writes it as an exact decimal, with any repeating part in parentheses.

    Runs entirely in your browser. Nothing you type or upload is sent to our servers.

    How a decimal becomes a fraction

    Every decimal that ends, and every decimal whose digits eventually repeat in a fixed block, is a fraction of two whole numbers. A decimal that ends is the easy case: the place value of the last digit tells you the denominator. Tenths give a denominator of 10, hundredths 100, thousandths 1000, and so on. After writing it that way, divide the top and bottom by their greatest common factor to reach lowest terms.

    A repeating decimal needs one extra move: shift the point so the repeating part lines up, subtract to cancel the endless tail, and solve for the number. The calculator does this with a closed formula and prints the subtraction it used.

    Worked example 1: a terminating decimal

    Convert 0.125.

    1. Three digits follow the point, so write 125 over 10³: 125/1000.
    2. The greatest common factor of 125 and 1000 is 125.
    3. Divide both: 125 ÷ 125 = 1 and 1000 ÷ 125 = 8, so 0.125 = 1/8.

    Worked example 2: a repeating decimal

    Convert 0.1666…, entered as 0.1(6).

    1. Let x = 0.1666…. Then 10x = 1.666… and 100x = 16.666….
    2. Subtract: 100x − 10x = 16.666… − 1.666… = 15, so 90x = 15.
    3. x = 15/90, and dividing both by 15 gives 1/6.

    The page uses the same numbers: (16 − 1) ÷ (10 × 9) = 15/90 = 1/6. Try 0.(3) and the result is (3 − 0) ÷ 9 = 1/3.

    Things to watch

    • A calculator display that shows 0.3333333 is a truncated value. Its exact value is 3333333/10000000, not 1/3. Enter 0.(3) when you mean the repeating decimal.
    • The denominator of the reduced fraction tells you what kind of decimal you started with. If it has no prime factors other than 2 and 5, the decimal ends. Otherwise it repeats.
    • For a decimal larger than 1, the mixed number is often easier to read than the improper fraction.

    Related calculators

    To go the other way, use the Fraction to Decimal Calculator. For adding, subtracting and multiplying fractions, open the Fraction Calculator. Reduce the result further with the GCF Calculator, or compare parts of a whole in the Percentage Calculator.

    Frequently asked questions

    How do I convert a decimal to a fraction?

    Write the digits after the decimal point over a power of 10 with as many zeros as there are digits, then reduce. For 0.125 there are three digits, so it is 125/1000. The greatest common factor of 125 and 1000 is 125, and dividing both gives 1/8. The calculator shows each of these steps.

    How do I enter a repeating decimal?

    Put the repeating digits in parentheses right after the point or after the non-repeating digits. Write 0.(3) for 0.333…, 0.1(6) for 0.1666… and 1.2(34) for 1.2343434…. The calculator then finds the exact fraction: 0.(3) is 1/3, 0.1(6) is 1/6 and 1.2(34) is 611/495.

    Why does 0.333 give 333/1000 and not 1/3?

    Because 0.333 ends after three digits, so its exact value really is 333/1000. The calculator never guesses that a short decimal was a rounded repeating one. If you meant one third, enter 0.(3). The same applies to 0.667, which is 667/1000, not 2/3.

    Is 0.999… equal to 1?

    Yes. Entering 0.(9) returns 1. The working shows why: with one repeating digit and nothing before it, the formula gives 9 ÷ 9 = 1. The two notations name the same number, so there is no smallest gap between 0.(9) and 1.

    How are mixed numbers and negatives handled?

    A decimal above 1, such as 3.75, becomes an improper fraction (15/4) and the calculator also shows the mixed number (3 3/4). A leading minus sign is kept on the whole result, so −3.75 gives −15/4 and −3 3/4. The size of the number is limited only by the 60-digit input cap.

    Can I convert a percent or a ratio this way?

    A percent is a decimal times 100, so divide by 100 first: 12.5% is 0.125, which is 1/8. The calculator also shows the decimal as a percent in the result list. For a ratio such as 3 : 8, write it as the fraction 3/8 and use the fraction to decimal page if you want the decimal.

    How many digits can I enter?

    Up to 60 digits in total, counting the digits before the point, after it, and inside the parentheses. The conversion uses exact whole-number arithmetic with no rounding, so even long decimals produce a fraction that is exactly equal to the input.

    Is anything I type saved or sent anywhere?

    No. The conversion runs in your browser, and nothing you enter is stored or sent to our servers. Only a count that the tool was used is recorded, without any numbers from the form.

    Link to this tool

    Found it useful? Copy a link for your page, newsletter or documentation.

    Get new tools and guides by email

    Optional. The tool above works without signing up.

    One email every Tuesday. Free, and you can unsubscribe in one click.

    More free tools

    Browse all everyday calculators or the full list of free tools.