Example 1
- 0.75
3/4
75/100, GCD = 25 → 3/4.
Enter one decimal number. The calculator looks for a reduced fraction a/b (denominator ≤ 10,000). For 0.75 the result is 3/4: first 75/100, then reduction by GCD = 25. A period and a comma are equivalent. Adding two fractions is on a separate page.
Enter a decimal number. The reduced fraction will appear here.
Adding and multiplying fractions is on the fraction calculator. The leftover after the integer (without a/b form) is on fractional part. GCD of two integers — on the GCD calculator.
A rational number can be written as a ratio of two integers a/b in lowest terms (GCD(|a|,b) = 1, b > 0). A terminating decimal has finitely many digits after the point: 0.75 is seventy-five hundredths, that is 75/100. The Euclidean algorithm computes GCD(75,100) = 25; dividing both numbers by 25 yields 3/4. That is the classic school path: place value, then reduction.
The calculator uses the single number you enter in the Decimal number field. A period (US) and a comma give the same result. For a terminating form you enter, the panel shows the place-value fraction (for example 75/100), the GCD, and the reduced fraction. When the expansion is not a pure power of ten or is truncated (for example 0.333 instead of 0.(3)), the calculator searches for the best continued-fraction approximation with denominator at most 10,000, then still reduces by the GCD. Absolute error versus the input appears in the panel.
Zero gives 0/1. A whole number, for example 4, gives 4/1. A negative sign moves to the numerator: −0.75 → −3/4. When |a| > b, the result is improper; the mixed form appears beside it (2.5 → 5/2 and 2 1/2). An empty field is an error.
A repeating decimal in a textbook is solved algebraically: if x = 0.(3), then 10x = 3.(3) and 9x = 3, so x = 1/3. This calculator does not require a separate repeating-bar notation in the field; it approximates the floating-point value with a denominator cap. That is why 0.333 may not come out as exactly 1/3 — an honest model limit, not money rounding.
Examples on this page: 0.75 → 3/4; 0.2 → 1/5; 2.5 → 5/2; 0.125 → 1/8; −0.75 → −3/4; 0 → 0/1; 4 → 4/1; 0.375 → 3/8. The fractional part of 3.25 = 0.25 is on a different page. The sum 1/2 + 1/3 is on the fraction calculator.
Terminating decimal: if there are k digits after the point forming integer m, start with m / 10k (integer part in the numerator), then a/b = (m / GCD) / (10k / GCD).
Worked reduction: 0.75 = 75/100; GCD(75,100) = 25; 75÷25 = 3, 100÷25 = 4; therefore 3/4.
GCD — Euclidean algorithm: GCD(u,v) = GCD(v, u mod v) until the remainder is 0.
Repeating (textbook): for x = 0.(d) with period length n, use 10nx − x. For a general decimal this page uses continued fractions with b ≤ 10,000, then reduces by the GCD.
Mathematical model: decimal to irreducible fraction (place value + GCD / Euclid; CF approximation under a denominator cap).
A decimal representation of a real number x is a base-10 expansion. Many values admit an equivalent ordinary fraction p/q in lowest terms, with p ∈ ℤ, q ∈ ℕ, q > 0 and gcd(p, q) = 1. Passing from a finite decimal to a fraction is classical arithmetic: 0.75 = 75/100 = 3/4 after cancelling the gcd. When x is not a finite decimal (or when floating-point arithmetic only approximates x), one seeks the best fraction with a bounded denominator. This calculator uses the continued-fraction algorithm with denominator limit 10 000, then reduces by Euclid’s GCD.
A continued fraction of a positive number has the form a₀ + 1/(a₁ + 1/(a₂ + …)), where the aᵢ are successive integer parts of reciprocal remainders. The convergents hₙ/kₙ approach x and are best approximations in Dirichlet’s sense: |x − h/k| < 1/k². NIST DLMF §1.12 and Knuth, The Art of Computer Programming, Vol. 2, describe the mechanism. After obtaining a candidate p/q the calculator divides numerator and denominator by gcd(p, q) so the result is in lowest terms.
In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.
Converting decimals to fractions arises in accounting, metrology, teaching, and computer graphics, where floating coordinates should be expressed as integer ratios. Classical tables (Abramowitz & Stegun) and MathWorld (Continued Fraction) treat continued-fraction reduction as the standard way to recover a sensible fraction from an approximation.
Conceptually the calculator does not invent an infinite repeating expansion such as 1/3 = 0.(3). For a floating-point input it reads the finite machine value and searches for a small-denominator fraction near that value. For exact finite decimals (e.g. 0.125) the GCD-reduced result is exact: 1/8. For numbers such as π the approximation depends on the denominator cap.
In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.
Input: any finite real x (comma or period). Output: a pair (p, q) with q > 0, gcd(|p|, q) = 1, and the sign carried on the numerator. For x = 0 the result is 0/1. Integer x yield denominator 1.
Algorithm: (1) peel off sign and integer part; (2) iterate the continued-fraction expansion of the fractional part until convergence or the k ≤ 10 000 limit; (3) reduce p/q by GCD. The absolute error |x − p/q| is reported in the meta panel. The identity p/q ≈ x holds in floating-point arithmetic within that error.
Euclid’s GCD: gcd(a, b) = gcd(b, a mod b) until remainder 0 — the same algorithm used by the fraction calculator on this site when reducing operation results.
In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.
Step 1. Let x ≠ 0, s = sign(x), X = |x|, a₀ = ⌊X⌋, y = X − a₀. If y ≈ 0, the result is (s·a₀)/1.
Step 2. Seed convergents h₋₁ = 1, k₋₁ = 0, h₀ = a₀, k₀ = 1. While y is meaningfully positive and k stays within the limit: y ← 1/y, a ← ⌊y⌋, (h, k) ← (a·hₙ + hₙ₋₁, a·kₙ + kₙ₋₁), y ← y − a.
Step 3. After stopping, set p ← s·h, q ← k. Compute g = gcd(|p|, q) and return (p/g)/(q/g).
Step 4 (why it works). Continued-fraction convergents minimize |q·x − p| among fractions with denominator ≤ q. Standard proofs: Hardy & Wright; Knuth, TAOCP §4.5.3.
In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.
Examples: 0.5 → 1/2; 0.75 → 3/4; 0.125 → 1/8; 2.5 → 5/2; −0.2 → −1/5; 22/7 as an approximation to π appears when the input is near 3.142857… with a sufficient denominator limit.
When |x| is very large or very near zero, floating-point arithmetic loses significant digits; the “best” fraction then describes the machine value, not an ideal real entered on the keyboard. Integer inputs (e.g. 7) yield 7/1 without continued-fraction iteration.
In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.
The browser computes in floating-point arithmetic (about 15–16 significant digits). The denominator cap of 10 000 guards against huge q from numerical noise. Comma and period are equivalent.
The calculator also shows absolute error and an optional mixed form. It does not solve algebraic equations or simplify symbolic expressions — it only converts one number into a fraction.
In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.
Related tools: the fraction calculator (operations + GCD reduction), floor, and fractional part. Converting a fraction to a decimal is ordinary division p/q.
Authorities: Knuth, TAOCP Vol. 2; NIST DLMF §1.12; MathWorld — Continued Fraction; Hardy & Wright. The calculator is educational and does not replace a number-theory textbook.
In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.
0.75 = 75/100 = 3/4 after GCD = 25. Result denominator ≤ 10,000. Sign on the numerator.
3/4
75/100, GCD = 25 → 3/4.
1/5
2/10, GCD = 2 → 1/5.
5/2
Improper; mixed 2 1/2.
1/8
125/1000 → 1/8.
−3/4
Sign on the numerator.
0/1
Zero as a fraction.
4/1
Whole number.
3/8
375/1000, GCD = 125.
Write the digits after the decimal point over a power of ten (as many zeros as places), then reduce by the GCD. Example: 0.75 = 75/100; GCD(75,100) = 25, so 3/4. The calculator shows the place-value form and the reduced result.
A terminating decimal ends after finitely many digits; after reducing the place-value denominator, only factors 2 and 5 remain. A repeating decimal repeats a block; the school algebra method uses x = 0.(d) and 10ⁿx − x. Here the calculator searches for the best fraction with denominator ≤ 10,000 (continued fractions), so 0.333 may not come out as exactly 1/3.
GCD(a,b) is the largest positive integer dividing both a and b. Dividing numerator and denominator by the GCD yields a fraction in lowest terms. For 75 and 100: 100 = 1·75 + 25, 75 = 3·25 + 0, so GCD = 25 and 75/100 = 3/4.
Yes. US copy uses a period (0.75); the calculator also accepts a comma (0,75). Both give 3/4.
When |numerator| > denominator, the fraction is improper (for example 5/2). The panel also shows the mixed form 2 1/2. A whole number is a fraction with denominator 1, for example 4 = 4/1.
Yes. Zero gives 0/1. A negative sign moves to the numerator: −0.75 → −3/4. An empty field is an error, not a fraction.
The fractional part of 3.25 is 0.25 (what remains after removing the integer). Here 0.75 becomes the common fraction 3/4. Adding or multiplying two fractions (for example 1/2 + 1/3) belongs on the separate fraction calculator.
The result denominator is at most 10,000. That is a continued-fraction approximation bound, not money rounding.
0.75 = 3/4 (75/100, GCD = 25). 0.2 = 1/5. 2.5 = 5/2, mixed form 2 1/2. Those are examples 1–3 on this page.
No. The calculator turns one decimal number into a common fraction. Percentage of a number and other unit tools have separate pages.
Place value, GCD / Euclid, and irreducible fractions below come from recognized references.
Page updated October 14, 2026.