MaximCalculator Free, fun & accurate calculators
🔢 Platinum math layout
🌙Dark Mode

Decimal to Fraction Calculator

Convert any decimal into a simplified fraction and a mixed number in one click — with clean, shareable steps. Supports ordinary decimals like 2.75 and repeating decimals written in parentheses like 0.(3) or 1.2(34).

Instant simplified fraction
🧠Repeating decimal support: 0.(3)
🧾Step-by-step conversion
📱Perfect for screenshots & sharing

Enter a decimal

Type a decimal like 0.125 or a repeating decimal like 0.(6). Use parentheses to mark the repeating part.

🔢
🧩
Your fraction will appear here
Enter a decimal and tap “Convert to Fraction” to see the simplified fraction and steps.
Tip: repeating decimals can be written like 0.(3) = 0.333… and 1.2(34) = 1.2343434…
Step-by-step work
Steps will appear here after you convert.

This calculator is for educational use. Always verify critical results (e.g., exams, engineering, finance) with your own checks.

📚 Formula breakdown

How to convert a decimal to a fraction (the exact logic)

The idea behind a decimal-to-fraction conversion is surprisingly simple: every decimal is just a whole number divided by a power of 10. The “power of 10” depends on how many digits appear after the decimal point. For example, 0.5 is “five tenths,” which is 5/10. Then we simplify it to 1/2. A decimal like 2.75 is “two and seventy-five hundredths,” which is 275/100 — and we can reduce that fraction.

Case 1: terminating decimals (they end)

A terminating decimal is one that stops, like 0.125 or -3.4. To convert it: (1) remove the decimal point, (2) put the result over the correct power of 10, and (3) simplify using the greatest common divisor (GCD).

  • Example: 0.125 → 125/1000 → divide top & bottom by 125 → 1/8
  • Why 1000? There are 3 digits after the decimal, so the denominator is 10³ = 1000.
  • Negative decimals: keep the minus sign on the numerator: -0.04 → -4/100 → -1/25
Case 2: repeating decimals (they repeat forever)

Repeating decimals are decimals where a pattern repeats forever — like 0.33333… or 1.2343434…. Those are still fractions (in fact, every repeating decimal is a rational number). The classic method uses subtraction to “cancel” the repeating part.

In this calculator, repeating decimals are entered using parentheses. For example: 0.(3) means 0.3333…, and 1.2(34) means 1.2343434… The digits before the parentheses are the non‑repeating part; the digits inside parentheses are the repeating cycle.

Repeating decimal formula

Suppose you have a number written like: integerPart . nonRepeating ( repeating )

Let k = number of non‑repeating digits, and r = number of repeating digits. Build two whole numbers:

  • A = digits of integerPart + nonRepeating + repeating
  • B = digits of integerPart + nonRepeating

Then the fraction is: (A − B) / (10^(k+r) − 10^k) and we simplify it like any other fraction.

Example: Convert 0.(6). Here integerPart = 0, nonRepeating = "" (k = 0), repeating = "6" (r = 1). So A = 06 = 6, B = 0. Denominator is 10^(0+1) − 10^0 = 10 − 1 = 9. Fraction = (6 − 0)/9 = 6/9 = 2/3.

Example: Convert 1.2(34). integerPart = 1, nonRepeating = "2" (k = 1), repeating = "34" (r = 2). A = 1234, B = 12. Denominator = 10^(1+2) − 10^1 = 1000 − 10 = 990. Fraction = (1234 − 12)/990 = 1222/990 = 611/495.

That’s it. The calculator automates the bookkeeping (counting digits, building A and B, and simplifying). The result is exact — not an approximation — as long as your repeating part is correctly marked with parentheses.

Simplification via GCD

Once we have a numerator and denominator, we reduce them to lowest terms by dividing both by their greatest common divisor. The GCD is the largest integer that divides both numbers without remainder. For example, 275/100 has GCD 25, so 275÷25 / 100÷25 = 11/4.

🧪 Examples

Worked examples you can copy

Example 1: 2.75

Step 1: Remove the decimal point: 2.75 → 275.
Step 2: Two decimal places → denominator 100 → 275/100.
Step 3: Simplify by GCD(275, 100) = 25 → 11/4.
Step 4 (mixed number): 11 ÷ 4 = 2 remainder 3 → 2 3/4.

Example 2: 0.125

0.125 has 3 decimal places → 125/1000. Divide numerator and denominator by 125: 125/1000 = 1/8. As a mixed number it stays 1/8.

Example 3: 0.(3)

0.(3) means 0.333… with repeating digit 3. Using the repeating formula: A = 3, B = 0, denominator = 10 − 1 = 9 → 3/9 = 1/3.

Example 4: 3.1(6)

3.1(6) means 3.1666… (non‑repeating digit is 1, repeating digit is 6). k = 1, r = 1. A = 316, B = 31, denominator = 10^(2) − 10^1 = 100 − 10 = 90. Fraction = (316 − 31)/90 = 285/90 = 19/6 = 3 1/6.

Example 5: Why 0.999… = 1

A classic: 0.(9) means 0.999… Enter 0.(9) and you’ll get 1/1. Using the formula: A = 9, B = 0, denominator = 9 → 9/9 = 1. This isn’t a trick — in real math, 0.999… and 1 are exactly the same number.

Common mistakes
  • Forgetting to simplify: 50/100 should reduce to 1/2.
  • Repeating digits not in parentheses: 0.333 is not the same as 0.(3).
  • Using commas: Use a dot for decimals: 1.25 (not 1,25).
  • Accidental extra zeros: 1.20 is fine — it simplifies to 6/5.
🧭 How it works

What the calculator does behind the scenes

When you click Convert to Fraction, the calculator reads your input as text (not just as a floating-point number). That matters because computers store decimals like 0.1 approximately, which can lead to weird results if you rely on binary floating-point math. By treating your entry as a string, we can build an exact integer numerator and denominator and simplify it with integer arithmetic.

Step-by-step pipeline
  • 1) Clean + validate: We accept formats like 12, 12.34, -0.04, 0.(3), 1.2(34). If it doesn’t match, we show an error.
  • 2) Detect repeating parentheses: If your input includes (...), we split it into integer part, non‑repeating digits, and repeating digits.
  • 3) Build A and B: We concatenate digits to form two whole numbers used in the repeating-decimal fraction formula.
  • 4) Build denominator: Using 10 powers based on digit counts, we form 10^(k+r) − 10^k.
  • 5) Simplify: If simplification is ON, we divide numerator and denominator by their GCD.
  • 6) Mixed number: If |numerator| ≥ denominator, we convert to a mixed number with a whole part and remainder.
  • 7) Render steps: We format the math steps so you can screenshot or copy them.

For virality, the share buttons automatically create a message with your decimal and its fraction, plus a link to this calculator. It’s the kind of quick “math glow-up” people love to post: “I typed 0.(6) and got 2/3.”

When should you use fraction vs mixed number?

Use a fraction if you’re working in algebra, proportions, or you need an exact ratio (for example, “11/4” is often better for equations). Use a mixed number if you’re describing amounts in everyday contexts (recipes, measurements, or word problems): “2 3/4 cups” is more readable than 11/4.

Quick sanity check

A fast way to check your result: divide the fraction numerator by denominator and see if it matches the original decimal (approximately). If you entered a repeating decimal, the fraction is exact, but the decimal will show a rounded approximation when written out.

❓ FAQs

Frequently Asked Questions

  • Does this work for repeating decimals?

    Yes. Enter repeating decimals using parentheses, like 0.(3) or 1.2(34). Parentheses tell the calculator exactly which digits repeat forever.

  • What’s the difference between 0.333 and 0.(3)?

    0.333 stops after three digits (it’s a terminating decimal), while 0.(3) means the 3 repeats forever: 0.33333… They’re close, but not exactly the same number.

  • Why do some fractions look “weird,” like 611/495?

    Repeating decimals with a mixed repeating pattern often produce less “pretty” fractions. That’s normal — the fraction is still exact. For example, 1.2(34) is 1.2343434… and its exact fraction is 611/495.

  • Can you convert decimals larger than 1?

    Absolutely. You’ll get both a fraction and a mixed number (like 2.75 → 11/4 → 2 3/4). If you choose “mixed number only,” we’ll show just the mixed form.

  • Does it handle negative decimals?

    Yes. The fraction keeps the negative sign on the numerator. For instance, -0.04 becomes -1/25 after simplification.

  • Why not just use a calculator app?

    Many basic calculators convert to a fraction, but they often don’t show steps or handle repeating decimals clearly. This tool is built for clarity and shareability — it’s fast, visual, and explains the math.

  • What if my decimal is an approximation?

    If your input is a terminating decimal like 0.33, it represents exactly 33/100. If you meant “one third,” use repeating notation: 0.(3). In other words: the calculator converts what you typed, exactly.

  • How do I write repeating decimals with more than one digit repeating?

    Put the repeating block in parentheses: 0.(142857) for the repeating cycle of 1/7, or 1.2(34) for 1.2343434… Any length repeating block works.

MaximCalculator provides simple, user-friendly tools. Always double-check important numbers.