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
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
| Type | Definition | Examples | As Fraction |
|---|---|---|---|
| Terminating | Finite number of decimal places | 0.5, 0.25, 0.125 | 1/2, 1/4, 1/8 |
| Repeating | Infinite pattern of repeating digits | 0.333..., 0.666... | 1/3, 2/3 |
| Mixed repeating | Some non-repeating, some repeating | 0.1666..., 0.12333... | 1/6, 37/300 |
| Non-terminating, non-repeating | Irrational numbers | 3.14159..., 1.414213... | No exact fraction |
Converting Terminating Decimals to Fractions
The Method
Terminating decimals convert directly to fractions using powers of 10.
Step-by-Step Process
- Count decimal places (n).
- Write decimal as numerator over 10^n as denominator.
- Find GCD of numerator and denominator.
- 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
| Decimal | As Fraction / 10^n | Simplified | GCD Used |
|---|---|---|---|
| 0.5 | 5/10 | 1/2 | 5 |
| 0.25 | 25/100 | 1/4 | 25 |
| 0.75 | 75/100 | 3/4 | 25 |
| 0.20 | 20/100 | 1/5 | 20 |
| 0.125 | 125/1000 | 1/8 | 125 |
| 0.375 | 375/1000 | 3/8 | 125 |
| 0.625 | 625/1000 | 5/8 | 125 |
| 0.875 | 875/1000 | 7/8 | 125 |
Converting Fractions to Decimals
The Method
Divide the numerator by the denominator using long division or a calculator.
Step-by-Step Process
- Identify numerator (dividend) and denominator (divisor).
- Perform division.
- Observe if decimal terminates or begins repeating.
- 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
| Fraction | Decimal | Type | Percentage |
|---|---|---|---|
| 1/2 | 0.5 | Terminating | 50% |
| 1/3 | 0.333... | Repeating | 33.33% |
| 1/4 | 0.25 | Terminating | 25% |
| 1/5 | 0.2 | Terminating | 20% |
| 1/6 | 0.1666... | Mixed repeating | 16.67% |
| 1/7 | 0.142857... | Repeating | 14.29% |
| 1/8 | 0.125 | Terminating | 12.5% |
| 1/9 | 0.111... | Repeating | 11.11% |
| 2/3 | 0.666... | Repeating | 66.67% |
| 3/4 | 0.75 | Terminating | 75% |
Converting Repeating Decimals to Fractions
Repeating decimals require an algebraic method to find the exact fraction.
The Algebraic Method
- Let x equal the repeating decimal.
- Multiply by 10^n where n is the number of repeating digits.
- Subtract the original equation to eliminate the repeating tail.
- Solve for x as a fraction.
- 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
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
| Fraction | Denominator | Prime Factors | Result |
|---|---|---|---|
| 1/2 | 2 | 2 | Terminates: 0.5 |
| 1/4 | 4 | 2 x 2 | Terminates: 0.25 |
| 1/5 | 5 | 5 | Terminates: 0.2 |
| 1/8 | 8 | 2 x 2 x 2 | Terminates: 0.125 |
| 1/3 | 3 | 3 | Repeats: 0.333... |
| 1/6 | 6 | 2 x 3 | Repeats: 0.166... |
| 1/7 | 7 | 7 | Repeats: 0.142857... |
| 3/20 | 20 | 2 x 2 x 5 | Terminates: 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
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.