
Fraction To Decimal Converter
Use this free fraction to decimal converter to divide any integer numerator by a nonzero denominator (like 1/8 = 0.125) up to 12 significant digits online.
Open toolEnter any terminating decimal with up to 12 decimal places and 30 total digits into this decimal to fraction converter to turn it into a simplified integer fraction (p/q). All calculations run in your browser using string-parsed BigInt greatest common divisors with zero floating-point rounding drift.
Enter the inputs, then select Convert decimal.
Result will appear here
Every terminating decimal with k digits after the decimal point equals an integer divided by 10^k. This decimal to fraction calculator parses your text input directly into BigInt integers and reduces the ratio to lowest terms (or use our Fraction To Decimal Converter to reverse the conversion).
Power-of-10 Scaling: den = 10^k (for 0 <= k <= 12 decimal places), num = BigInt(integer + fractional digits), d = gcd(|num|, den), output = (num / d) / (den / d).
Because 10^k = 2^k × 5^k, Euclidean GCD reduction cancels all shared factors of 2 and 5 in BigInt up to 30 total digits (see our GCF Calculator and Fraction Simplifier).
Compare 10 common terminating decimals from 0.015625 to 2.75 alongside their decimal place count (k), unreduced power-of-10 fraction (num / 10^k), greatest common divisor (GCD), and reduced p/q output.
| Finite Decimal Input | Decimal Places (k) | Unreduced num / 10^k | GCD(|num|, 10^k) | Reduced Output (p/q) | Mixed / Practical Equivalent |
|---|---|---|---|---|---|
| 0.015625 | 6 | 15625 / 1000000 | 15625 | 1/64 | 1/64 inch (0.396875 mm) |
| 0.03125 | 5 | 3125 / 100000 | 3125 | 1/32 | 1/32 inch (0.79375 mm) |
| 0.0625 | 4 | 625 / 10000 | 625 | 1/16 | 1/16 inch (1.5875 mm) |
| 0.125 | 3 | 125 / 1000 | 125 | 1/8 | Preloaded default (12.5%) |
| 0.25 | 2 | 25 / 100 | 25 | 1/4 | Quarter (25%) |
| 0.3125 | 4 | 3125 / 10000 | 625 | 5/16 | 5/16 inch bolt gauge |
| 0.375 | 3 | 375 / 1000 | 125 | 3/8 | Three-eighths (37.5%) |
| 0.5 | 1 | 5 / 10 | 5 | 1/2 | One-half (50%) |
| 0.75 | 2 | 75 / 100 | 25 | 3/4 | Three-quarters (75%) |
| 2.75 | 2 | 275 / 100 | 25 | 11/4 | Mixed number 2 3/4 (275%) |
Convert any terminating decimal string into a lowest-terms ratio in three steps.
Type or paste your decimal into the Finite decimal field (0.125 is preloaded). Include at least one digit before the decimal point (0.125, not .125).
Select Convert decimal to place your digits over 10^k and cancel their greatest common divisor in BigInt.
Read the reduced p/q fraction in Your result, then click Copy or Download (result.txt) to save the answer.
See how the converter processes binary inch decimals, numbers greater than 1, and high-precision multi-place decimals.
With the default 0.125, the parser counts k = 3 decimal places (den = 10^3 = 1000), extracts num = 125, and computes gcd(125, 1000) = 125. Dividing both terms by 125 returns 1/8. To convert a percentage like 12.5% into a fraction, divide by 100 first (0.125) using our Percentage Calculator.

Entering 2.75 sets k = 2 (den = 100) and num = 275. Dividing numerator and denominator by gcd(275, 100) = 25 outputs the improper fraction 11/4. You can add, subtract, multiply, or divide improper fractions directly in our Fraction Calculator, or rewrite 11/4 as the mixed number 2 3/4 (11 ÷ 4 = 2 remainder 3).

Entering the 6-place machinist gauge decimal 0.015625 sets den = 10^6 = 1,000,000 and num = 15,625. Because 1,000,000 ÷ 15,625 = 64, gcd(15625, 1000000) = 15,625, reducing the ratio in one step to 1/64. If you have a rounded decimal approximation of a non-power-of-10 fraction (like 0.142857 for 1/7), find its compact rational convergent in our Continued Fraction Calculator.

Every result displayed in the Your result panel follows three rules:
First, because den = 10^k = 2^k × 5^k, the reduced denominator q is always a product of powers of 2 and 5. Proper decimals (|x| < 1) produce proper fractions (0.375 -> 3/8), while decimals with magnitude > 1 produce improper fractions (2.75 -> 11/4). To write an improper output p/q as a mixed number W r/q, divide |p| by q: the integer quotient is W and the remainder r stays over q (11 ÷ 4 = 2 remainder 3, or 2 3/4).
Second, if you enter an integer (5) or a decimal whose fractional digits are all zero (5.00), gcd(500, 100) = 100 cancels the entire power of 10 and returns 5/1. Negative inputs (-0.375) keep their minus sign on the numerator (-3/8).

Before clicking Convert decimal, check that your input satisfies the validator (/^[+-]?\d+(?:\.\d{1,12})?$/):
First, you can enter up to 12 digits after the decimal point and up to 30 total digits across the integer and fractional parts. Exceeding either bound triggers 'Use a finite decimal with at most 12 decimal places and 30 digits.' A bare leading period (.125), thousands commas (1,000.25), or embedded whitespace fails the regular expression check, so prefix sub-unit values with 0. or -0..
Second, exponential strings (1.25e-3) must be expanded into standard decimal form (0.00125) first using our Scientific Notation Converter. Entering a truncated repeating decimal like 0.333333333333 treats it as an exact 12-place finite decimal and returns 333333333333/1000000000000; to recover 1/3, use the 10^k - 1 rule below or our Continued Fraction Calculator.


Use this free fraction to decimal converter to divide any integer numerator by a nonzero denominator (like 1/8 = 0.125) up to 12 significant digits online.
Open toolUse this free fraction simplifier to reduce proper and improper fractions to lowest terms, find the greatest common divisor (GCD), and get mixed numbers.
Open tool
Use this free fraction calculator to add, subtract, multiply, or divide two fractions (like 1/3 + 1/6 = 1/2) and reduce the result to lowest terms online.
Open toolChoose another tool for your next calculation, conversion, or text task.
Use this free continued fraction calculator to expand fractions and decimals into simple continued fractions and convergents p/q with 100-digit BigInt.
Open tool
Find the greatest common factor of the supplied integers.
Open tool
Use this free percentage calculator to calculate percentage of a number (Percentage × Base / 100) up to 12 significant digits, with examples and tables.
Open toolUse this free scientific notation converter to convert decimals and E-notation (like 2.5e-3 or 12345) into standard form, coefficient, and power of 10.
Open toolAnswers about using Decimal To Fraction Converter and understanding its results.
Count the number of digits k after the decimal point, write the number without the decimal point as the numerator over 10^k (10 for 1 place, 100 for 2 places, 1,000 for 3 places), and divide both top and bottom by their greatest common divisor (GCD). For 0.375, write 375 / 1000 and divide both by 125 to get 3/8.
The input parser validates strings against /^[+-]?\d+(?:\.\d{1,12})?$/, which requires at least one integer digit before the optional decimal point so typos like a stray period are caught immediately.
Divide the numerator by the denominator using integer division (11 ÷ 4 = 2 with a remainder of 3). Write the quotient 2 as the whole number and place the remainder 3 over the original denominator 4 (2 3/4).
Because this tool converts finite decimals over 10^k, place one repeating block of length k over 10^k - 1 (a string of k nines) and simplify in our Fraction Simplifier. For 0.333... (k = 1), simplify 3/9 = 1/3; for 0.142857... (k = 6), simplify 142857 / 999999 = 1/7.
You can enter up to 12 digits after the decimal point (denominators up to 10^12 = 1,000,000,000,000) and up to 30 total digits across the entire number.
Divide the percentage by 100 (move the decimal point two places to the left) to get a finite decimal (37.5% -> 0.375), then enter 0.375 into this converter to get 3/8.
Choose another tool for your next calculation, conversion, or text task.