Decimal to Fraction
Convert the entered finite decimal into a reduced fraction.
Your numbers
Reduced fraction
The decimal is interpreted as the JavaScript numeric input, with up to about 15 significant digits.
Scenario comparison
Up to three snapshots in this tab. Loading one replaces the current inputs.
Formula
Remove the decimal point, divide by 10ⁿ, then reduce by gcd.
Convert the entered finite decimal into a reduced fraction.
Worked example
- Decimal
- 0.125
- Reduced fraction
- 1/8
- Numerator
- 1
- Denominator
- 8
Scope and limitations
The decimal is interpreted as the JavaScript numeric input, with up to about 15 significant digits.
Inputs are checked for missing values and allowed ranges. A result outside the finite numeric range is not displayed. Rounding affects display, while the calculation uses the model’s numeric precision.
Check your units and assumptions before relying on a result. Changing a label does not convert a currency or physical unit.
Formula version: 9a63a2a02e65 · Example checked: