Exact integer arithmeticReviewed 28 Sep 2026Runs in your browser

Fraction Calculator

Add, subtract, multiply and divide fractions and mixed numbers, or simplify one — with the answer as a reduced fraction, a mixed number, a decimal (including repeating decimals) and a percent, and every step shown.

Who wrote it

Written by Suhaib Hassan. The rules are standard arithmetic and the worked examples are re-derived by hand. Our methodology.

How the engine works

It uses arbitrary-size integers, finds the lowest common denominator, combines the numerators, then reduces with Euclid’s greatest-common-divisor algorithm. No rounding occurs until the decimal display.

Why we built it

Fractions are exact, decimals are not. This page keeps the exact answer and shows every step, including how a repeating decimal repeats.

Operation and fractions

Presets
Fraction 1whole · numerator · denominator
Fraction 2whole · numerator · denominator

Leave the whole number at 0 for a plain fraction. For a negative mixed number put the minus sign on the whole number (−2 1/3), or on the numerator when the whole number is 0.

Expression—
Result (lowest terms)—
—

—

Mixed number—
Decimal—

Number line

Where the fractions and the result sit between whole numbers.

—

Step-by-step working

—

—

    Rules for fraction arithmetic

    The four operations and simplifying.

    OperationRuleExampleCondition
    Adda/b + c/d = (ad + bc) / bd3/4 + 2/3 = 17/12b, d ≠ 0; the lowest common denominator keeps numbers small
    Subtracta/b − c/d = (ad − bc) / bd3/4 − 2/3 = 1/12The result can be negative
    Multiplya/b × c/d = ac / bd3/4 × 2/3 = 1/2Cancel common factors first to keep numbers small
    Dividea/b ÷ c/d = ad / bc3/4 ÷ 2/3 = 9/8c ≠ 0: flip the divisor and multiply
    Simplifya/b = (a÷g) / (b÷g)18/24 = 3/4g = GCD(a, b)

    Worked examples

    Adding lengths

    A 1 5/8″ board plus a 3/32″ gasket.

    1 5/8 = 13/8 = 52/32
    52/32 + 3/32 = 55/32
    = 1 23/32 inches

    Combining volumes

    2/5 mL of one solution plus 3/8 mL of another.

    LCD(5, 8) = 40
    16/40 + 15/40 = 31/40 mL

    Scaling a recipe

    A recipe needs 3/4 cup of sugar; you make 2 2/3 batches.

    3/4 × 8/3 = 24/12
    = 2 cups

    What is a fraction?

    A fraction a/b represents a parts out of b equal parts, or the quotient a ÷ b. It is proper if a < b, improper if a ≥ b, and a mixed number combines a whole number with a proper fraction (1 5/12 = 17/12). Two fractions are equivalent if they have the same value: 2/4 = 1/2.

    How to simplify

    Divide the numerator and denominator by their greatest common divisor (GCD), found with Euclid’s algorithm. For 17/12: GCD(17, 12) = GCD(12, 5) = GCD(5, 2) = GCD(2, 1) = 1, so 17/12 is already in lowest terms.

    Repeating decimals

    A fraction in lowest terms has a terminating decimal exactly when its denominator has no prime factors other than 2 and 5. Otherwise the decimal repeats; the repeating block is at most (denominator − 1) digits long. For example 17/12 = 1.41666… = 1.41(6).

    By Suhaib Hassan · Reviewed 28 September 2026 · How CalculatePilot verifies formulas →

    Sources

    • Euclid, Elements, Book VII, Propositions 1–2 — the Euclidean algorithm for the greatest common divisor.
    • Knuth, D. E. (1997). The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3rd ed., section 4.5 (rational arithmetic).
    • ISO 80000-2:2019, Quantities and units — Part 2: Mathematics.

    Frequently asked questions

    Why use the lowest common denominator instead of just multiplying the denominators?

    Any common denominator works, but the lowest one keeps the numbers small and often skips a later simplification step. For 5/6 + 1/4, multiplying gives 26/24 which must be reduced to 13/12; the LCD 12 gives 13/12 directly.

    How can I tell whether a decimal will terminate or repeat?

    Reduce the fraction, then factor the denominator. If it contains only 2s and 5s, the decimal terminates (3/8 = 0.375). Any other prime factor makes it repeat (1/3 = 0.(3), 1/7 = 0.(142857)).

    How do negative fractions work?

    Only the fraction as a whole carries a sign: −3/4 = 3/(−4) = −(3/4). This calculator keeps the denominator positive and puts the sign on the numerator (or in front of a mixed number).

    How do I convert a mixed number to an improper fraction?

    Multiply the whole number by the denominator, add the numerator, and keep the denominator: 2 1/3 = (2 × 3 + 1)/3 = 7/3. Going the other way, divide and keep the remainder: 7/3 = 2 remainder 1, so 2 1/3.

    Why can’t the denominator be zero?

    Division by zero is undefined. A denominator of 0 would mean splitting something into zero parts. Dividing by a fraction whose numerator is 0 is likewise undefined.

    What is a continued fraction?

    It writes a number as a whole part plus 1 over another whole part plus 1 over …: 17/12 = 1 + 1/(2 + 1/(2 + 1/2)), written [1; 2, 2, 2]. The quotients are exactly the ones produced by Euclid’s algorithm.

    Related calculators

    Continue with number tools.

    All Math Calculators

    Embed This Fraction Calculator

    Free and responsive, and it runs in the visitor's browser. Branding removal from $7.99/month.

    <iframe src="https://www.calculatepilot.com/embed/fraction-calculator.html" width="100%" height="560" loading="lazy" title="Fraction Calculator"></iframe>
    For website owners

    Want this calculator on your own website?

    Embed it in one line of code. Keep it free with a small CalculatePilot attribution link, or go white-label: your brand, no attribution, one license for all your domains.

    • All 159 calculators, unlimited embeds
    • Works on WordPress, Webflow, Squarespace, Wix and plain HTML
    • Runs in your visitor's browser, so nothing is sent to a server
    • License key emailed automatically after checkout, cancel anytime
    $7.99 / month
    or $89.99 / year · white-label Pro
    Get the white-label license Embed free with attribution