CCalcNest AI

Fraction Calculator

Simplify fractions and convert to decimal.

Enter values above — results appear instantly as you type.
AI Insight: Fractions stay exact where decimals quietly lie — one-third is precisely 1/3 but only approximately 0.333. For recipes, ratios, and anything you'll scale up, keeping values as fractions avoids rounding errors that compound as numbers grow.
Notice: This calculator is provided for educational reference. Results depend entirely on the values you enter, and you should verify any figure used for academic, professional, or safety-critical purposes. See our full disclaimer.
Written with AI assistance and checked by automated validation · Last updated: August 2026 · How we build and check this · Methodology
Looking for a different calculator? Try our AI Finder — describe what you need in plain English. Try AI Finder →

Formula

Simplify by GCD

Example

8/12 → 2/3.

Embed this calculator on your site

Add this free calculator to your own website with one line of code. The embedded version is responsive, ad-free, and includes a small attribution link back to CalcNest AI.

<iframe src="https://calcnestai.com/embed/fraction-calculator.html" width="100%" height="700" frameborder="0" style="border: 1px solid #e5e5e5; border-radius: 12px; max-width: 720px;" loading="lazy" title="Fraction Calculator — Free Tool by CalcNest AI"></iframe>

Understanding the Fraction Calculator

A fraction calculator reduces a fraction to lowest terms and gives its decimal value. Reduction uses the greatest common divisor, computed by an algorithm from Euclid that remains one of the most efficient procedures in mathematics.

How it actually works

Enter a numerator and denominator. The calculator finds their greatest common divisor and divides both by it, then gives the decimal equivalent. Three over four is already in lowest terms and equals 0.75.

Why fractions beat decimals sometimes
ValueFractionDecimal
One third1/3, exact0.333… never terminates
One tenth1/10, exact0.1, exact in decimal, not in binary
Two sevenths2/7, exact0.285714 repeating
Any rationalAlways exactExact only sometimes

The deeper context most people miss

One tenth is the important row for anyone writing software. It has no exact binary representation, so 0.1 plus 0.2 does not equal 0.3 in floating point, which is the single most reported surprise in programming and the reason monetary calculations use integers or decimal types.

Why Euclid's algorithm still matters

The greatest common divisor could be found by factoring both numbers and taking common factors, and factoring large numbers is computationally hard, which is what modern cryptography depends on. Euclid's algorithm avoids factoring entirely: repeatedly replace the larger number with its remainder when divided by the smaller, until one becomes zero, and the other is the greatest common divisor. It appears in the Elements around 300 BC and is among the oldest algorithms still in everyday use. Its efficiency is remarkable, running in a number of steps proportional to the logarithm of the smaller input, and its worst case occurs precisely when the inputs are consecutive Fibonacci numbers, a result proved by Lamé in 1844 that is regarded as one of the earliest results in computational complexity. The extended version additionally finds integers satisfying Bézout's identity, expressing the greatest common divisor as a combination of the two inputs, and that extension is what computes modular multiplicative inverses, which is a core operation in RSA key generation and in many cryptographic protocols. So an algorithm devised for geometry over two millennia ago is executed billions of times a day securing internet traffic. The binary variant replaces division with shifts and subtractions and is faster on some hardware.

A worked example: when a fraction terminates

Three quarters gives exactly 0.75 while one third does not terminate, and the rule determining which is clean: a fraction in lowest terms has a terminating decimal expansion if and only if its denominator's prime factors are only 2 and 5, the primes dividing ten. So halves, quarters, fifths, eighths, tenths, and twentieths terminate, while thirds, sevenths, ninths, and elevenths repeat. The same rule generalises to any base, which is why one third terminates in base 3 and why one tenth does not terminate in base 2, since 10 has a factor of 5 that 2 does not. The length of the repeating block is determined by the multiplicative order of the base modulo the denominator, and one seventh is the famous case with a six-digit repeat whose cyclic permutations reproduce themselves under multiplication. Repeating decimals can always be converted back to fractions exactly, which is the proof that 0.999 recurring equals 1: a value repeating forever is the limit of a geometric series, and that series sums to exactly 1 rather than approaching it. That result is correct and reliably contested, and the confusion comes from treating an infinite decimal as a process that never finishes rather than as a number defined by a limit.

Deciding when to use fractions rather than decimals

Fractions are exact for any rational number, which makes them the right choice wherever accumulated rounding matters. Symbolic mathematics keeps values as fractions throughout and rationalises only at the end, which avoids the error that decimal intermediate steps introduce. Cooking and construction use fractions because the underlying units are divided in halves and quarters, and imperial measurement is fundamentally fractional, so converting to decimals and back introduces rounding where working in sixteenths does not. Music notation is entirely fractional, with note durations as powers of two and time signatures as fractions. Probability and combinatorics stay exact in fractions. Gear ratios, aspect ratios, and scale factors are naturally fractional. Against that, decimals are easier to compare at a glance, easier to add mentally, and required for most measurement and instrumentation. The practical rule is to compute in fractions where exactness matters and convert to decimals for presentation, rather than converting early. In software, this maps onto using integer or decimal types for money and rational arithmetic libraries where available, and floating point for physical measurement where the input is already approximate.

Why floating point breaks decimal intuition

Computers represent non-integer numbers in binary floating point under IEEE 754, storing a sign, an exponent, and a significand, which means a number is exactly representable only if it can be written as a binary fraction. One half, one quarter, and three eighths are exact; one tenth and one fifth are not, since they require infinitely repeating binary expansions that get truncated. The consequence is that 0.1 plus 0.2 gives 0.30000000000000004, which is not a bug but the correct result of adding two approximations. This produces several practical rules. Never compare floating point values for exact equality; compare within a tolerance appropriate to the magnitude. Never use floating point for money, since fractions of a cent accumulate and financial calculations require exactness; use integer cents or a decimal type with defined rounding. Be aware that addition is not associative in floating point, so summing a list in different orders gives different results, which matters for reproducibility in numerical work and is why some libraries specify summation order. Catastrophic cancellation occurs when subtracting nearly equal numbers, destroying significant digits, and rearranging a formula can avoid it. Decimal floating point types exist and are used in financial systems for exactly these reasons.

Variations: mixed numbers, continued fractions, and rational arithmetic

Mixed numbers combine a whole part with a proper fraction and suit measurement contexts, while improper fractions are easier to compute with, so conversion happens at presentation. Continued fractions express numbers as nested reciprocals and produce the best rational approximations for a given denominator size, which is how 22/7 and 355/113 arise as approximations to π, the latter being accurate to seven digits. The golden ratio has the simplest continued fraction of all, consisting entirely of ones, which is the precise sense in which it is the most irrational number and why it appears in phyllotaxis. Egyptian fractions express values as sums of distinct unit fractions and are a historical curiosity with some combinatorial interest. Farey sequences order fractions by denominator and connect to number theory. In computing, rational number types storing numerator and denominator as integers give exact arithmetic at the cost of denominators growing quickly, and they are available in Python's fractions module and equivalents elsewhere. Computer algebra systems use them throughout. For fixed-point arithmetic, scaling integers by a known factor gives exactness for money and measurement without the complexity of full rational types.

Working with fractions accurately

Reduce to lowest terms using the greatest common divisor rather than by trial factoring, since Euclid's algorithm is fast and does not require factorisation. Note that a fraction terminates as a decimal only when its reduced denominator has no prime factors other than 2 and 5. Keep values as fractions through intermediate calculation and convert to decimals only for presentation, which avoids accumulating rounding error. Never use binary floating point for money, since one tenth has no exact binary representation and fractions of a cent accumulate; use integer units or a decimal type. Never compare floating point values for exact equality, comparing within a tolerance instead. Be aware that floating point addition is not associative, so summation order affects results in numerical work. Use rational arithmetic libraries where exactness matters and denominators stay manageable. Use continued fractions to find the best rational approximation for a given denominator limit. And normalise the sign to the numerator when a negative denominator appears, since 1/−2 and −1/2 are the same value in different forms.

What people get wrong

  • Using binary floating point for monetary values, when one tenth has no exact binary representation and rounding accumulates across transactions.
  • Comparing floating point results for exact equality, when arithmetic on approximations produces values that differ in the final bits.
  • Converting to decimals early in a calculation, which introduces rounding that fractions would have avoided entirely through to the final step.
  • Assuming every fraction has a terminating decimal, when only denominators whose prime factors are 2 and 5 terminate in base ten.

Where the math comes from

A fraction is reduced by dividing numerator and denominator by their greatest common divisor, found using Euclid's algorithm: repeatedly replace the larger value with its remainder on division by the smaller until one reaches zero. A fraction in lowest terms terminates as a decimal precisely when its denominator's only prime factors are 2 and 5.

Questions and answers

What is the difference between percent and percentage point?

Percent change is relative (going from 5% to 10% is a 100% increase). Percentage point change is absolute (the same shift is a 5 percentage point increase). News stories often confuse these.

How do I calculate a discount?

Discount amount = original x discount %. Final price = original x (1 - discount %). For 20% off $100: discount $20, final $80.

What is the formula for compound percentage?

Final = original x (1 + r1) x (1 + r2) x ... where each r is a percentage as decimal. A 10% raise then 10% cut: 1.10 x 0.90 = 0.99 = 99% of original.

How do I reverse a percentage?

If $80 is 80% of original: original = $80 / 0.80 = $100. To reverse 'X% off' to find original: original = final / (1 - X/100).

How do percentages work in tax?

Marginal tax rate applies to income within a bracket. Effective rate is total tax / total income. They diverge because of progressive brackets.

Why doesn't 0.1 + 0.2 equal 0.3?

Because one tenth has no exact representation in binary floating point, so both values are stored as approximations and their sum is the correct sum of those approximations. It's why monetary calculations should use integer units or a decimal type rather than floating point.

Which fractions give terminating decimals?

Those whose denominator in lowest terms has no prime factors other than 2 and 5. Halves, quarters, fifths, and eighths terminate; thirds, sevenths, and ninths repeat. The rule generalises to any base using that base's prime factors.

Does 0.999 recurring equal 1?

Yes, exactly. An infinitely repeating decimal is defined as the limit of a geometric series, and that series sums to exactly 1 rather than approaching it. The confusion comes from treating the decimal as an unfinished process rather than as a number.

How does Euclid's algorithm work?

Repeatedly replace the larger number with its remainder when divided by the smaller, until one becomes zero; the other is the greatest common divisor. It avoids factorisation entirely, runs in logarithmic time, and dates to around 300 BC.

When should I use fractions instead of decimals?

Whenever exactness matters and the values are rational: symbolic computation, probability, gear and aspect ratios, imperial measurement, and music notation. Compute in fractions and convert to decimals only for presentation, rather than converting early and accumulating rounding.

Why is 22/7 used for π?

It's a continued fraction convergent, meaning the best rational approximation for its denominator size, accurate to about two decimal places. The next good one, 355/113, is accurate to seven digits and was known in China by the fifth century.

Can I compare floating point numbers?

Not for exact equality. Compare within a tolerance appropriate to the magnitude of the values, since arithmetic on binary approximations produces results differing in the final bits even when the mathematics says they should match.

Related calculators

Percentage · Decimal to Fraction · Percentage Change · Set Operations · Ratio