calculator.onl
Categories50

Decimal to Fraction & Fraction to Decimal Converter

Convert decimals to simplified fractions or fractions to decimals. Support terminating and repeating decimals, including recurring blocks such as 0.1(6).

A worked example

Shade one quarter of the strip, then three quarters.

Reduced fraction1/6Decimal representation0.1(6)Numerator1Denominator6
Choose decimal input, including optional repeating parentheses, or a p/q fraction.

Examples: 0.125, −2.1(6), or 7/12. Use a dot or a single decimal comma; do not use scientific notation.

Updates as you type

Use at most 80 digits: a decimal such as 0.1(6), or p/q with a nonzero integer denominator. No scientific notation.

YOUR RESULT

Reduced fraction

1/6

Calculated from your inputs

Decimal representation0.1(6)
Numerator1
Denominator6
Repeating period length1
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

Convert in either direction: decimal to fraction or fraction to decimal. Repeating decimals, also called recurring decimals, use parentheses around the repeating block, such as 0.(3) or 0.1(6). Decimal input becomes a reduced fraction; fraction input is expanded until it terminates, a repeating cycle is found or the display limit is reached. This changes a number’s representation rather than performing arithmetic between two numbers. For a related calculation, try Fraction Calculator with Mixed Numbers.

What to enter

InputWhat it meansExample value
Input formatChoose decimal input, including optional repeating parentheses, or a p/q fraction.Decimal, optionally repeating
Number to convertExamples: 0.125, −2.1(6), or 7/12. Use a dot or a single decimal comma; do not use scientific notation.0.1(6)

How the calculation works

  1. For m nonrepeating and r repeating digits, subtract the shifted expansions to obtain an integer fraction.
  2. Reduce numerator and denominator by their GCD and keep the denominator positive.
  3. Use long division; repeated remainders identify the repeating block, while remainder zero identifies termination.
The formula0.A(B) = [A(10^r − 1) + B] / [10^m(10^r − 1)]

A worked example

Worked example: 0.1(6) = 1/6. For 7/12 the decimal is 0.58(3) and the repeating period length is 1.

Example you can load

What to enter
Result for this example · Reduced fraction1/6

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Input contains at most 80 digits. Parentheses mark one repeating block, as in 0.1(6). Fractions require an integer numerator and nonzero denominator. Decimal output is capped at 1000 digits; an unresolved period is not reported as zero.

Frequently asked questions

How do I enter a repeating decimal?

Use parentheses for the repeating block: 0.(3) is 1/3, and 0.1(6) is 1/6.

Does 0.(9) equal 1?

Yes. The infinite repeating decimal 0.(9) converts exactly to 1.

What does an ellipsis mean?

The displayed digits reached the 1000-digit limit before termination or a full repeating cycle was found.