Zero Signup ToolsFree browser tools

Calculator Tools

Decimal to Fraction Converter

Convert decimals to fractions and fractions to decimals. Exact reduction, mixed numbers, repeating decimal detection, and a nearest inch-fraction table.

Try an example

Type a decimal like 0.625 or a fraction like 5/8. The tool detects the direction.

Accepts decimals (0.625, 3.14, -1.5), proper or improper fractions (5/8, 22/7), mixed numbers (1 3/4), and bare whole numbers.

Precision

Pick how to round when the typed decimal looks noisy.

Math uses BigInt so digits never round off. The decimal-to-fraction best-fit uses the continued-fraction algorithm, the same method Python and NumPy use for limit_denominator.

Nearest standard fraction

Common imperial denominators stamped on tape measures, rulers, and drill bits. Pick the closest fit for shop work.

DenominatorNearest fractionDecimalError
1/21/20.50.125
1/43/40.750.125
1/85/80.625exact
1/165/80.625exact
1/325/80.625exact
1/645/80.625exact

Tip: 1/64 is the finest fraction on a typical US tape measure. If none of these are close enough, use the exact fraction above.

How the math works

Decimal to fraction

In Exact mode, the typed digits are placed over the matching power of ten and reduced by the greatest common divisor. In Best fit mode, the continued-fraction expansion picks the cleanest rational under the chosen maximum denominator (same algorithm as Python Fraction.limit_denominator).

Fraction to decimal

Long division over BigInts detects when a remainder repeats. If it never does, the decimal terminates. If it does, the repeating block is wrapped in parentheses (1/7 becomes 0.(142857)), the convention used in US math textbooks.

Inch fractions

The nearest-standard table rounds your decimal to 1/2, 1/4, 1/8, 1/16, 1/32, and 1/64. These are the denominators marked on US tape measures and on imperial drill-bit sets. The error column shows the rounding gap as a decimal.

How to use

  1. Type a decimal like 0.625 or a fraction like 5/8 into the input. The tool detects which direction to convert.
  2. Use a preset chip to try common examples (0.625, 1/3, 22/7, 1 3/4).
  3. For decimals, pick a precision: Exact keeps every digit; Best fit caps the denominator so 0.333333 becomes 1/3 instead of 333333/1000000.
  4. Read the result card for the simplified fraction or the decimal expansion. Repeating decimals are shown with the period in parentheses.
  5. When converting a decimal, the nearest standard fraction table maps your value to common imperial denominators (down to 1/64) with the rounding error shown.
  6. Click Copy report to copy a plain-text summary with every form (exact, mixed, decimal, percent, inch fractions).

About this tool

Decimal to Fraction Converter is a two-way converter between decimals and fractions, built around the kind of conversion students, machinists, woodworkers, cooks, and engineers actually search for. Type 0.625 and you get 5/8 in lowest terms; type 5/8 and you get 0.625. Type 1/3 and you get 0.(3), the repeating-block notation used in US textbooks. The math runs on BigInt internally so digits are never lost to floating-point rounding. Two algorithms do the work: decimal-to-fraction uses an Exact mode (typed digits over a power of ten, reduced by the greatest common divisor) and a Best fit mode that runs the continued-fraction expansion under a chosen maximum denominator, which is the same algorithm behind Python's Fraction.limit_denominator and NumPy's Rational helpers; fraction-to-decimal uses long division with cycle detection over BigInts so terminating decimals stop cleanly and repeating decimals report the exact period (1/7 returns 0.(142857) with a six-digit cycle). The tool also produces a nearest standard fraction table to the common imperial denominators stamped on US tape measures and drill-bit sets (1/2, 1/4, 1/8, 1/16, 1/32, 1/64) with the rounding error shown next to each row, so a 0.218 reading from a caliper rounds to 7/32 with a known gap. Mixed numbers are supported in both directions: 1 3/4 parses as one and three quarters, and 7/4 returns 1 3/4 as the mixed form alongside the improper fraction. A percent form is included for school answers and recipes. The tool detects when the typed decimal looks like a repeating pattern (three or more clean repetitions of the trailing digits) and surfaces the corresponding exact fraction, which solves the common problem of getting 333333/1000000 instead of 1/3 from a typed 0.333333. Direction is auto-detected from the input: a slash means fraction, a dot or a bare integer means decimal. Useful for homework, for converting a dial reading to a clean fraction on a shop floor, for sizing parts to imperial drill bits, for translating recipe scalings between forms, and for any time the answer needs to be expressed as a clean rational rather than a rounded decimal. All math runs in your browser. The numbers you type are never uploaded, logged, or sent to a server.

Free to use. Works in your browser. No signup, no login.

Related tools

You may also like

All tools
All toolsCalculator Tools