Decimal to Fraction Calculator

Convert terminating and repeating decimals to fractions, or fractions to decimals. Results are automatically simplified to lowest terms.

Decimal to Fraction

Fraction to Decimal

Repeating Decimal

Mixed to Decimal

Result
Select conversion type and enter value

Quick Examples

Introduction to Decimal and Fraction Conversion

When you need to measure ingredients precisely, convert measurements between metric and imperial systems, simplify ratios, or understand the exact value of repeating patterns like 0.333..., converting between decimals and fractions becomes essential. These two representations express the same numbers differently — decimals show the value directly while fractions reveal the integer ratio.

A decimal to fraction calculator instantly converts terminating decimals (like 0.75) and repeating decimals (like 0.333...) to their precise fractional form. Understanding this conversion builds foundational number sense and reveals why certain decimals like 0.1 equal exact fractions (1/10) while others like 0.333... require infinite repetition.

Students learning rational numbers, engineers converting measurements, chefs adjusting recipes, carpenters working with fractional inches, pharmacists calculating dosages, and data analysts interpreting ratios all benefit from decimal-fraction conversions. This page covers both directions of conversion, handles terminating and repeating decimals, explains the underlying mathematics, and provides worked examples for every case.

What Are Decimals and Fractions?

Decimals

A decimal represents numbers using base-10 positional notation with a decimal point. Each position represents a power of 10: ones, tens, hundreds to the left; tenths, hundredths, thousandths to the right.

Example: 0.75 = 7/10 + 5/100 = 75/100 = 3/4

Fractions

A fraction represents a ratio of two integers: numerator/denominator. Fractions show the exact integer relationship without decimal approximation.

Example: 3/4 means "three parts out of four equal parts"

Why Two Representations?

Decimals are convenient for calculation and measurement. Fractions reveal exact rational relationships. Converting between them provides complete understanding of rational numbers.

Types of Decimals

TypeDefinitionExamplesAs Fraction
TerminatingFinite number of decimal places0.5, 0.25, 0.1251/2, 1/4, 1/8
RepeatingInfinite pattern of repeating digits0.333..., 0.666...1/3, 2/3
Mixed repeatingSome non-repeating, some repeating0.1666..., 0.12333...1/6, 37/300
Non-terminating, non-repeatingIrrational numbers3.14159..., 1.414213...No exact fraction

Converting Terminating Decimals to Fractions

The Method

Terminating decimals convert directly to fractions using powers of 10.

Decimal with n places = Decimal x 10^n / 10^n, then simplify

Step-by-Step Process

  1. Count decimal places (n).
  2. Write decimal as numerator over 10^n as denominator.
  3. Find GCD of numerator and denominator.
  4. Divide both by GCD to simplify.

Worked Examples

Example 1: Convert 0.75 to a fraction

  • Decimal places: 2
  • Write as: 75/100
  • Find GCD(75, 100) = 25
  • Divide: 75/25 = 3, 100/25 = 4
  • Result: 3/4

Example 2: Convert 0.125 to a fraction

  • Decimal places: 3
  • Write as: 125/1000
  • Find GCD(125, 1000) = 125
  • Divide: 125/125 = 1, 1000/125 = 8
  • Result: 1/8

Example 3: Convert 2.5 to a fraction

  • Decimal places: 1
  • Write as: 25/10
  • Or keep whole: 2 + 5/10 = 2 + 1/2
  • As improper: 5/2 or mixed: 2 1/2
  • Result: 5/2 or 2 1/2

Example 4: Convert 0.04 to a fraction

  • Decimal places: 2
  • Write as: 4/100
  • Find GCD(4, 100) = 4
  • Divide: 4/4 = 1, 100/4 = 25
  • Result: 1/25

Example 5: Convert 3.625 to a fraction

  • Decimal places: 3
  • Write as: 3625/1000
  • Find GCD(3625, 1000) = 125
  • Divide: 3625/125 = 29, 1000/125 = 8
  • Result: 29/8 or 3 5/8

Reference Table

DecimalAs Fraction / 10^nSimplifiedGCD Used
0.55/101/25
0.2525/1001/425
0.7575/1003/425
0.2020/1001/520
0.125125/10001/8125
0.375375/10003/8125
0.625625/10005/8125
0.875875/10007/8125

Converting Fractions to Decimals

The Method

Divide the numerator by the denominator using long division or a calculator.

Fraction = Numerator / Denominator (decimal division)

Step-by-Step Process

  1. Identify numerator (dividend) and denominator (divisor).
  2. Perform division.
  3. Observe if decimal terminates or begins repeating.
  4. Use bar notation for repeating decimals.

Worked Examples

Example 1: Convert 3/4 to decimal

  • Divide: 3 / 4
  • Long division: 4 into 3.00 = 0.75
  • Result: 0.75

Example 2: Convert 1/3 to decimal

  • Divide: 1 / 3
  • Long division: 3 into 1.000... = 0.1 remainder 1 (repeats)
  • Result: 0.333... or 0.3(bar)

Example 3: Convert 5/8 to decimal

  • Divide: 5 / 8
  • Long division: 8 into 5.000 = 0.625
  • Result: 0.625

Example 4: Convert 7/22 to decimal

  • Divide: 7 / 22 = 0.318181818...
  • Pattern "18" repeats infinitely
  • Result: 0.318(bar) or 0.31818...

Common Fraction-Decimal Conversions

FractionDecimalTypePercentage
1/20.5Terminating50%
1/30.333...Repeating33.33%
1/40.25Terminating25%
1/50.2Terminating20%
1/60.1666...Mixed repeating16.67%
1/70.142857...Repeating14.29%
1/80.125Terminating12.5%
1/90.111...Repeating11.11%
2/30.666...Repeating66.67%
3/40.75Terminating75%

Converting Repeating Decimals to Fractions

Repeating decimals require an algebraic method to find the exact fraction.

The Algebraic Method

  1. Let x equal the repeating decimal.
  2. Multiply by 10^n where n is the number of repeating digits.
  3. Subtract the original equation to eliminate the repeating tail.
  4. Solve for x as a fraction.
  5. Simplify if needed.

Worked Examples

Example 1: Convert 0.333... to a fraction

  • Let x = 0.333...
  • Multiply by 10: 10x = 3.333...
  • Subtract: 10x - x = 3.333... - 0.333...
  • Result: 9x = 3
  • Solve: x = 3/9 = 1/3
  • Result: 1/3

Example 2: Convert 0.666... to a fraction

  • Let x = 0.666...
  • 10x = 6.666...
  • 10x - x = 6
  • x = 6/9 = 2/3
  • Result: 2/3

Example 3: Convert 0.181818... to a fraction (two repeating digits)

  • Let x = 0.181818...
  • Two digits repeat, so multiply by 100: 100x = 18.181818...
  • 100x - x = 18.181818... - 0.181818...
  • 99x = 18
  • x = 18/99 = 2/11
  • Result: 2/11

Example 4: Convert 0.121212... to a fraction

  • Let x = 0.121212...
  • 100x = 12.121212...
  • 99x = 12
  • x = 12/99 = 4/33
  • Result: 4/33

Mixed Repeating Decimals

When some digits don't repeat and others do, use a modified approach.

Example 5: Convert 0.1666... to a fraction

  • Let x = 0.1666...
  • "1" doesn't repeat, "6" repeats
  • Multiply by 10 to move past non-repeating: 10x = 1.666...
  • Multiply by 10 again: 100x = 16.666...
  • Subtract: 100x - 10x = 16.666... - 1.666...
  • 90x = 15
  • x = 15/90 = 1/6
  • Result: 1/6

Formula for Repeating Decimals

For 0.abcd... where "cd" repeats: fraction = (abcd - ab) / (900...) with 9s for repeating and 0s for non-repeating

Terminating vs. Repeating Decimals

The Determinant: Denominator Prime Factors

The denominator of a simplified fraction determines whether the decimal terminates or repeats:

  • Terminates: Denominator has only prime factors 2 and 5.
  • Repeats: Denominator has prime factors other than 2 and 5.

Examples

FractionDenominatorPrime FactorsResult
1/222Terminates: 0.5
1/442 x 2Terminates: 0.25
1/555Terminates: 0.2
1/882 x 2 x 2Terminates: 0.125
1/333Repeats: 0.333...
1/662 x 3Repeats: 0.166...
1/777Repeats: 0.142857...
3/20202 x 2 x 5Terminates: 0.15

Why This Works

Our base-10 system uses 10 = 2 x 5. Dividing by powers of 2 and 5 produces terminating decimals. But dividing by 3, 7, 11, or any other prime produces remainders that cycle — creating repeating patterns.

Converting Mixed Numbers to Decimals

Method 1: Convert to Improper Fraction First

Convert mixed number to improper fraction, then divide.

Example: 2 3/4

  • Convert: 2 3/4 = 11/4
  • Divide: 11/4 = 2.75
  • Result: 2.75

Method 2: Keep Whole, Convert Fraction

Convert the fraction part separately and add to the whole number.

Example: 3 1/8

  • Convert fraction: 1/8 = 0.125
  • Add to whole: 3 + 0.125 = 3.125
  • Result: 3.125

Real-Life Use Cases

Cooking and Baking

Recipe conversions between metric (decimals) and US customary (fractions). A 0.333... cup equals 1/3 cup precisely. Digital scales show 75g while recipes list 3 oz portions.

Construction and Carpentry

Lumber measurements use fractions: 2x4 lumber is actually 1.5 x 3.5 inches. Converting 0.75 inches to 3/4 inch for traditional measurement tools.

Finance and Banking

Interest rates expressed as decimals (0.05) or fractions (1/20). Stock prices in decimals, bond prices in fractions. Understanding equivalency prevents calculation errors.

Engineering and Manufacturing

Tolerances specified as fractions or decimals interchangeably. A tolerance of 0.005 inches equals 1/200 inch. Precise conversions ensure parts fit correctly.

Science and Medicine

Laboratory measurements often need conversion between decimal readouts and fractional dilutions. A 0.25 concentration equals 1/4 strength dilution.

GPS and Navigation

Coordinates expressed in decimal degrees (40.7128) or degrees-minutes-seconds format. Converting between formats requires understanding both representations.

Decimal to Fraction Conversion in Programming

Python Using fractions Module

from fractions import Fraction

# Terminate decimals
Fraction(0.75)  # Fraction(3, 4)
Fraction(0.125)  # Fraction(1, 8)

# From string (more precise)
Fraction('0.75')  # Fraction(3, 4)
Fraction('2.5')   # Fraction(5, 2)

# To decimal
from decimal import Decimal
float(Fraction(3, 4))  # 0.75
Decimal(3) / Decimal(4)  # Decimal('0.75')

JavaScript Implementation

function decimalToFraction(decimal) {
    const tolerance = 1.0E-10;
    let num = 1, den = 1;
    let x = decimal;

    // Continued fraction approximation
    while (Math.abs(x - num/den) > tolerance) {
        const a = Math.floor(x);
        const temp = den;
        den = num - a * den;
        num = a * num + temp;
        if (Math.abs(den) < tolerance) break;
    }

    const gcd = (a, b) => b ? gcd(b, a % b) : a;
    const g = gcd(num, den);

    return { numerator: num/g, denominator: den/g };
}

decimalToFraction(0.75); // { numerator: 3, denominator: 4 }

Precision Considerations

Floating-point decimals like 0.1 cannot be represented exactly in binary. Using string input or rational number libraries ensures accuracy. For critical applications, use exact arithmetic libraries.

Irrational Numbers

Some decimals never terminate AND never repeat — these are irrational numbers that cannot be expressed as fractions of integers.

Examples of Irrational Numbers

  • Pi: 3.141592653... — infinite non-repeating
  • sqrt(2): 1.41421356... — infinite non-repeating
  • Euler's number e: 2.718281828... — infinite non-repeating
  • Golden ratio: 1.618033988... — infinite non-repeating

How to Identify Irrationals

If a decimal continues indefinitely without settling into a repeating pattern, it represents an irrational number. These have no exact fractional representation as a ratio of integers.

Key Concepts and Glossary

  • Terminating decimal: Decimal with finite digits after the point (0.5, 0.25).
  • Repeating decimal: Decimal where digits repeat infinitely (0.333..., 0.1818...).
  • Mixed repeating decimal: Some digits non-repeating, others repeat (0.1666...).
  • Rational number: Any number expressible as a fraction of integers (includes terminating and repeating decimals).
  • Irrational number: Cannot be expressed as a fraction (non-terminating, non-repeating decimals).
  • Bar notation: Line over digits indicating repetition (0.3 for 0.333...).
  • GCD: Greatest Common Divisor, used for simplifying fractions.
  • Lowest terms: Fraction with numerator and denominator having no common factors.

Tips and Best Practices

  • Always simplify: 75/100 must become 3/4 for the final answer.
  • Use algebraic method for repeating decimals: The set x, multiply, subtract method always works.
  • Check denominator prime factors: Only 2 and 5 mean terminating; others mean repeating.
  • Mixed decimals with whole parts: Convert to improper fraction or keep whole separate.
  • Use fractions for repeating decimals: 0.333... is exactly 1/3, not approximately.
  • Memorize common conversions: 1/2=0.5, 1/4=0.25, 1/3=0.333..., 1/5=0.2.

Common Mistakes to Avoid

  • Forgetting to simplify: 75/100 is not the final answer; simplify to 3/4.
  • Truncating repeating decimals: 0.333... is not "about 0.33" — it equals exactly 1/3.
  • Wrong power of 10: 0.75 needs 100 (two places), not 10.
  • Assuming all decimals truncate: Many decimals repeat infinitely — use the algebraic method.
  • Confusing irrational with repeating: Pi doesn't repeat — irrationals have no fraction equivalent.
  • Using floating-point in programming: 0.1 in code is approximate; use string or fraction libraries for exact values.

Frequently Asked Questions

How do you convert a decimal to a fraction?
Write the decimal over a power of 10 (10, 100, 1000, etc.) based on how many decimal places there are, then simplify by dividing both numerator and denominator by their GCD. For 0.75, write 75/100, find GCD(75,100)=25, divide both by 25 to get 3/4.
How do you convert a fraction to a decimal?
Divide the numerator by the denominator using long division or a calculator. For 3/4, calculate 3 divided by 4 = 0.75. Some fractions produce terminating decimals (1/2 = 0.5), while others repeat indefinitely (1/3 = 0.333...).
What is a terminating decimal?
A terminating decimal has a finite number of digits after the decimal point. Examples: 0.5, 0.25, 0.75, 0.125. Terminating decimals come from fractions where the denominator (simplified) has only prime factors 2 and 5.
What is a repeating decimal?
A repeating decimal has digits that repeat indefinitely in a consistent pattern, shown with a bar over the repeating digits. Examples: 0.333... (= 1/3), 0.666... (= 2/3), 0.142857142857... (= 1/7). These come from fractions with prime factors other than 2 and 5 in the denominator.
How do you convert a repeating decimal to a fraction?
Use algebra: Let x equal the repeating decimal, multiply by a power of 10 to shift the decimal point past one complete repetition, subtract the original equation to eliminate the repeating tail, then solve for x. For 0.333...: Let x = 0.333..., then 10x = 3.333..., subtract: 10x-x = 3, so 9x = 3, x = 1/3.
What is 0.75 as a fraction?
0.75 = 75/100 = 3/4. Write as seventy-five hundredths, find GCD(75,100) = 25, divide numerator and denominator by 25. In lowest terms: 3/4.
What is 0.333... as a fraction?
0.333... = 1/3. Using the algebraic method: Let x = 0.333..., multiply by 10 to get 10x = 3.333..., subtract x from 10x to eliminate the repeating part: 9x = 3, therefore x = 3/9 = 1/3.
Why do some fractions create repeating decimals?
A fraction produces a repeating decimal when its denominator (in lowest terms) has prime factors other than 2 and 5. Since 10 only has prime factors 2 and 5, denominators with other primes (3, 7, 11, etc.) cannot divide evenly into any power of 10, causing the decimal representation to repeat.
How do you convert 0.125 to a fraction?
0.125 = 125/1000 = 1/8. Write as 125 thousandths, find GCD(125,1000) = 125, divide both numerator and denominator by 125. In lowest terms: 1/8.
What decimal is 1/3?
1/3 = 0.333... (repeating). When you divide 1 by 3, the division never terminates because 3 does not divide evenly into any power of 10. The digit 3 repeats infinitely: 0.333333...
How do you convert a mixed number to a decimal?
Either convert to an improper fraction first and divide, or divide the fractional part and add to the whole number. For 2 3/4: convert to 11/4 = 2.75, or calculate 3/4 = 0.75 and add 2 to get 2.75.
What is the difference between rational and irrational decimals?
Rational decimals either terminate (0.5, 0.25) or repeat with a pattern (0.333..., 0.142857...) and can be expressed as fractions of integers. Irrational decimals like pi = 3.14159... or sqrt(2) = 1.41421... never terminate and never settle into a repeating pattern — they cannot be written as fractions.
How can I tell if a decimal will terminate or repeat?
Convert to fraction form. If the denominator (simplified) has only 2s and 5s as prime factors, the decimal terminates. If it has any other prime factor (3, 7, 11, etc.), the decimal repeats. For 3/8 = 3/(2^3): terminates. For 1/6 = 1/(2x3): repeats.
How do you write 0.666... as a fraction?
0.666... = 2/3. Using the algebraic method: Let x = 0.666..., multiply by 10 to get 10x = 6.666..., subtract x from 10x: 10x - x = 6, so 9x = 6, x = 6/9 = 2/3 after simplification.

Historical Context

Ancient Egypt: Egyptians used unit fractions exclusively. The Rhind Papyrus (1650 BCE) shows methods for working with fractions, though decimal notation was not yet developed.

Ancient Babylon: Babylonians used base-60 (sexagesimal) notation as early as 2000 BCE. This influenced our time system (60 minutes, 60 seconds) and predates decimal fractions.

Medieval Islamic mathematics: Al-Kashi (15th century) developed decimal fractions to their modern form. Persian mathematicians used both decimal and sexagesimal systems.

European adoption: Simon Stevin's "De Thiende" (1585) introduced decimal fractions to Europe, advocating for their practical advantages in computation.

Modern standardization: Decimal point notation became standardized in the 17th-18th centuries. John Napier promoted the point notation, while some countries adopted the comma.

Related Calculators

These tools extend decimal-fraction concepts:

  • Fraction Calculator: Perform arithmetic operations on fractions.
  • GCD Calculator: Find greatest common divisor for simplification.
  • Percentage Calculator: Convert between fractions, decimals, and percentages.
  • Prime Factorization Calculator: Understand denominators affecting termination.
  • Ratio Calculator: Express and simplify ratios.
  • Rounding Calculator: Round decimals to specific places.

Conclusion

Converting between decimals and fractions reveals the fundamental nature of rational numbers. Terminating decimals directly represent fractions with denominators composed of 2s and 5s, while repeating decimals encode fractions with other prime factors in the denominator. The algebraic method for repeating decimals provides an elegant way to find exact fractional equivalents.

Understanding this conversion helps identify whether a decimal terminates or repeats, why patterns like 0.333... equal exactly 1/3, and which numbers (irrationals) have no fractional representation. These skills connect arithmetic, algebra, and number theory.

Use the decimal to fraction calculator above for instant, accurate conversions. Whether converting measurements, simplifying ratios, or solving mathematical problems, this tool provides step-by-step solutions for learning and verification.