Decimal to Fraction Converter

Find the closest simple fraction for any decimal.

Decimal to Fraction Converter

How was your experience with this tool?

Found a bug? Missing a feature? Tell us — it takes 10 seconds.

See how it works

Watch a quick simulation of this tool in action — no file needed.

How to use Decimal to Fraction Converter

Follow these steps — everything happens instantly in your browser.

  1. 1

    Step 1. Enter a decimal number (positive or negative).

  2. 2

    Step 2. See the closest simple fraction in mixed and improper form.

  3. 3

    Step 3. Copy the result to your clipboard.

Convert Any Decimal to the Closest Simple Fraction Instantly

Why this matters

Decimals are convenient for computation, but fractions are often more meaningful for communication and measurement. A machinist needs to know that 0.375 inches is exactly three-eighths, not a string of digits. A cook scaling a recipe benefits from knowing that 0.1667 of a cup is roughly one-sixth. In education, converting between decimal and fractional representations builds number sense and helps students understand that decimals and fractions are two views of the same underlying quantity.

The challenge is finding the simplest fraction that is close enough to the given decimal. Naive approaches, such as multiplying by a power of ten and reducing, produce unwieldy fractions like 3333/10000 for one-third. This tool uses continued-fraction expansion, a mathematical technique that produces the best possible rational approximation at each step. The result is the simplest fraction with a denominator up to 10,000 that is closest to your input, displayed in both mixed and improper form.

This approach also handles negative numbers and works across the full range of decimal precision available in JavaScript. Whether you enter 0.75, 3.14159, or -2.625, the tool returns a clean fraction that you can copy directly into a document, spreadsheet, or CNC program. The mixed-number form separates the whole number from the fractional remainder, which is the format most commonly used in recipes, measurements, and construction specifications.

Reference table

| Input | Mixed Form | Improper Form |

| --- | --- | --- |

| 0.5 | 1/2 | 1/2 |

| 0.75 | 3/4 | 3/4 |

| 0.375 | 3/8 | 3/8 |

| 1.25 | 1 1/4 | 5/4 |

| 3.14159 | 3 1/7 (approx) | 22/7 (approx) |

How to use it

Enter a decimal number in the input field, positive or negative.

The tool computes and displays the closest simple fraction in both mixed and improper form.

Review the result alongside the original decimal for comparison.

Click the copy button to transfer the fraction to your clipboard.

Testing your result

Verify the conversion by dividing the numerator by the denominator and checking that the result is close to your original decimal. For example, if the tool returns 22/7 for 3.14159, dividing 22 by 7 gives approximately 3.142857, which is close to the input. Test with simple known values first: 0.5 should yield 1/2, 0.25 should yield 1/4, and 0.75 should yield 3/4. Once the simple cases check out, try edge values like 0.3333, 0.6667, and 0.1 to see how the tool handles common repeating decimal approximations.

Common mistakes

Expecting an exact conversion for irrational numbers like pi or the square root of 2, which cannot be expressed as a simple fraction.

Confusing the mixed form with the improper form, which represent the same value but in different notations.

Entering a very long decimal string and assuming the fraction will be exact, when the denominator cap of 10,000 limits precision.

Using the result in a context that requires the original decimal precision, such as financial calculations where rounding errors matter.

Edge cases and options

The continued-fraction algorithm terminates when it finds a convergent with a denominator at or below 10,000 that is within a tight tolerance of the input. For inputs that are already exact fractions, such as 0.375, the algorithm returns the precise fraction 3/8 with no approximation. For inputs very close to common fractions, like 0.33333, it returns 1/3. Negative decimals work the same way, with the negative sign applied to the resulting fraction. The denominator cap of 10,000 is a practical balance between precision and readability, since fractions with larger denominators are rarely useful in everyday contexts.

Real-world use cases

Converting a decimal measurement from a digital caliper into a fractional inch value for a machining specification.

Translating a metric decimal recipe measurement into familiar fractional cups and tablespoons.

Helping a student understand the relationship between decimal and fractional representations in a math lesson.

Converting decimal probabilities into simple fractions for a statistics presentation or textbook.

Frequently asked questions

Q: How is the fraction computed?

A: Using continued-fraction expansion: repeatedly take the integer part, invert the remainder, and repeat. This gives the best rational approximation at each step within a max denominator of 10,000.

Q: Why is pi converted to 22/7?

A: 22/7 is the simplest fraction close to pi, approximately 3.142857 versus 3.141593. Better approximations exist like 355/113 but require larger denominators. The tool picks the closest simple one.

Q: What is the maximum denominator?

A: 10,000. Higher denominators give more precision but less practical fractions for everyday use.

Q: Does it handle repeating decimals?

A: It finds the closest fraction to the decimal you enter, which may match a repeating decimal. For exact rational conversion of repeating decimals, more context about the repeating pattern would be needed.

Q: What is the difference between mixed and improper form?

A: Mixed form separates the whole number from the fractional part, like 1 3/4. Improper form expresses the entire value as a single fraction, like 7/4. Both represent the same number.

Start using it now

Want the extended step-by-step tutorial? Read it here.

Why use this tool

Private by design

All processing happens locally in your browser. Open DevTools → Network and you'll see zero file uploads. Ever.

Instant

No upload wait, no queue, no server round-trip. Results appear the moment you drop a file.

Free & unlimited

No accounts, no watermarks, no daily caps. Use it as many times as you like, forever.

Works everywhere

Desktop, tablet or phone — every tool is responsive and installable as a PWA for offline use.

Frequently asked questions

Everything you might want to know about decimal to fraction converter.

❤️ This tool is free — forever.

Sharing it helps more people discover it, and ad revenue from visitors is what keeps it free. No accounts, no catch.

Want to learn more?

Read our complete Decimal to Fraction Converter tutorial with tips, use cases, and FAQs.