Decimal to Fraction Converter

Convert terminating and repeating decimals into reduced proper fractions, improper fractions, and mixed numbers with step-by-step Euclidean $\gcd$ reductions and algebraic proofs.

Rational Number & Repetend Reduction Engine
Examples:
Supports negative values, integer numbers, and decimals (e.g. 0.875, 1.25, -0.375)
Calculates architectural / woodworking nearest inch fraction
Exact Simplified Fraction
5 8
Mixed Number: None (Proper Fraction)
Percentage
62.5%
Scientific Notation
6.25 × 10⁻¹
Nearest Tape Measure
5/8 in
Reciprocal ($1/x$)
8/5 = 1.6
📐 Step-by-Step Mathematical Derivation

Converting Decimals to Fractions: Number Theory & Algebraic Reduction

In real arithmetic, rational numbers $\mathbb{Q}$ represent numerical quantities expressible as the quotient of two coprime integers $\frac{p}{q}$ ($q \ne 0$). Decimal representations divide fundamentally into two categories: terminating decimals, whose prime factors of the denominator consist strictly of powers of 2 and 5 ($q = 2^a 5^b$), and periodic repeating decimals, which feature an infinitely recurring digit sequence (repetend).

1. Terminating Decimals: Base-10 Integer Decoupling

A terminating decimal with $k$ fractional digits is expressed as an integer fraction over $10^k$:

$$x = \frac{N}{10^k}, \quad \text{where } N = x \times 10^k$$

The resulting fraction is reduced to canonical lowest terms by dividing both numerator and denominator by their Greatest Common Divisor (GCD) using the Euclidean Algorithm:

$$p = \frac{N}{\gcd(N, 10^k)}, \quad q = \frac{10^k}{\gcd(N, 10^k)}$$

2. Periodic Repeating Decimals: Algebraic Elimination Method

For repeating decimals having a non-repeating transient part $a$ of length $m$ followed by a repeating repetend $b$ of length $n$ ($x = 0.a\overline{b}$), algebra eliminates the infinite fractional tail:

$$\begin{aligned} 10^m x &= a.\overline{b} \\ 10^{m+n} x &= ab.\overline{b} \end{aligned}$$

Subtracting the two equations cancels the infinite decimal mantissa:

$$(10^{m+n} - 10^m) x = ab - a \implies x = \frac{ab - a}{10^m (10^n - 1)}$$

Architectural & Construction Standard Inch Fractions

In manufacturing, carpentry, and mechanical engineering, decimal dimensions must map to standard fractional inch increments ($\frac{1}{16}$, $\frac{1}{32}$, or $\frac{1}{64}$). To find the nearest $D$-th of an inch:

$$\text{Fraction Numerator} = \text{round}(x \times D), \quad \text{Nearest Inch} = \frac{\text{round}(x \times D)}{D}$$

Step-by-Step Conversion Examples

Example A: Terminating Decimal ($x = 0.375$)

  1. Count decimal digits: $k = 3 \implies \text{Denominator} = 10^3 = 1{,}000$.
  2. Set up raw fraction: $\frac{375}{1000}$.
  3. Find $\gcd(375, 1000) = 125$.
  4. Divide: $\frac{375 \div 125}{1000 \div 125} = \mathbf{\frac{3}{8}}$.

Example B: Repeating Decimal ($x = 0.1666\dots = 0.1\overline{6}$)

  1. Transient length $m = 1$ ($a = 1$), repetend length $n = 1$ ($b = 6$).
  2. Set up equations: $$\begin{aligned} 10^1 x &= 1.\overline{6} \\ 10^2 x &= 16.\overline{6} \end{aligned}$$
  3. Subtract: $100x - 10x = 16 - 1 \implies 90x = 15$.
  4. Reduce fraction: $\frac{15}{90} = \frac{15 \div 15}{90 \div 15} = \mathbf{\frac{1}{6}}$.
Google AdSense Bottom Banner • 728 × 90 / Responsive Matched
AD
Institutional Wealth & Health Analytics Platform
Empower your decision making with professional tools. Visit Official Partner.