Fraction Calculator

The calculator adds, subtracts, multiplies, and divides two common fractions, then reduces the result by the GCD. 1/2 + 1/3 = 5/6. 3/4 × 2/5 = 3/10. Reduce mode turns 2/4 into 1/2.

Inputs

First fraction
Second fraction

Result

Enter the fractions. The reduced result will appear here.

This is not the fractional part of a number and not a fractional power. The leftover after the integer is on the fractional part page. Domain: nonzero denominators; whole-number numerators and denominators.

How it works

How 1/2 + 1/3 is computed
1/23/6
1/32/6
sum5/6

A common fraction a/b, with b ≠ 0, is a quotient of whole numbers. The calculator uses the numbers you enter in fields ulamki-a … ulamki-d and the selected operation. For add and subtract the algebraic common denominator is the product of both denominators: a/b + c/d = (a·d + c·b)/(b·d). So 1/2 + 1/3 = (1·3 + 1·2)/(2·3) = 5/6. The same common denominator can be the LCM(b,d) = |b·d|/GCD(b,d); after reducing, the result is identical. The calculator uses the product and shows the LCM in the panel.

For multiply, (a/b)·(c/d) = (a·c)/(b·d). 3/4 × 2/5 = 6/20, and after reducing by GCD(6,20) = 2 that is 3/10. For divide, multiply the first fraction by the reciprocal of the second: (a/b) ÷ (c/d) = (a·d)/(b·c), provided c ≠ 0. (1/2) ÷ (1/4) = 2.

Reduce divides the numerator and denominator by the greatest common divisor. Euclid’s algorithm (Elements, Book VII) replaces the pair (x,y) with (y, x mod y) until the remainder is 0; the last nonzero divisor is the GCD. For 2/4 the GCD is 2, so the result is 1/2. If the reduced denominator is 1, the main result is a whole number. A minus in the denominator moves to the numerator.

Equality of fractions: a/b = c/d if and only if a·d = b·c (cross-multiplication), with b,d ≠ 0. That is a checking identity, not a separate form mode. There is no mixed-number input — when |result| ≥ 1 and the denominator is greater than 1, the panel also shows a mixed form.

This is not the fractional part of 3.25 and not a fractional power. A percent of a number and the separate GCD and LCM calculators are on related pages.

Formula

a/b + c/d = (a·d + c·b) / (b·d), then reduce by the GCD; domain b, d ≠ 0.

Subtract: (a·d − c·b)/(b·d). Multiply: (a·c)/(b·d). Divide: (a·d)/(b·c) when c ≠ 0. Reduce: divide numerator and denominator by GCD(|num|, |den|) via Euclid’s algorithm.

Mathematical model: arithmetic of rational numbers (field ℚ) with reduction by GCD — standard school arithmetic and Euclid, Elements Book VII (greatest common divisor).

Theory of fraction operations

Definition

The fraction calculator performs the four arithmetic operations on ordinary fractions a/b and c/d, plus simplification of a single fraction. Numerators and denominators are integers; a denominator cannot be zero. The result is always reduced to lowest terms: after the operation, numerator and denominator are divided by their greatest common divisor (GCD, Euclid’s algorithm). A negative denominator’s sign is moved to the numerator so the result denominator is positive.

Addition and subtraction: a/b ± c/d = (a·d ± c·b)/(b·d), then reduce. Multiplication: (a/b)·(c/d) = (a·c)/(b·d). Division: (a/b)÷(c/d) = (a·d)/(b·c) when c ≠ 0. Simplifying a/b alone is (a/g)/(b/g) with g = gcd(|a|, |b|). These rules are standard school arithmetic and the arithmetic of the field ℚ of rationals.

In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.

Historical and conceptual context

Ordinary fractions model the field of rationals: equivalence classes of integer pairs (p, q) with q ≠ 0 under (p, q) ∼ (p′, q′) ⇔ p·q′ = p′·q. Euclid’s GCD algorithm is ancient (Elements, Book VII) and remains the basis of cancellation. MathWorld (Fraction, Euclidean Algorithm) and Knuth, TAOCP §4.5, cover both the arithmetic and GCD complexity.

Conceptually the calculator does not operate on decimal fractions or symbolic expressions. You enter four (or two) integer fields; the output is again an integer-coefficient fraction. The parallel decimal display p/q is only a floating-point arithmetic preview, not a change of model.

In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.

Formal properties

Domain: a, b, c, d ∈ ℤ, b ≠ 0, and for division c ≠ 0 (with d ≠ 0 as the second denominator). Codomain: a reduced fraction with positive denominator. Results lie in ℚ.

GCD satisfies gcd(a, b) = gcd(b, a mod b). LCM(a, b) = |a·b|/gcd(a, b) for a, b ≠ 0; the panel may show the LCM of denominators when adding. Identities: (a/b) + (c/b) = (a + c)/b; (a/b)·(b/a) = 1 when a, b ≠ 0.

Reduction is unique up to sign: if p/q is reduced with q > 0, every equivalent fraction has the form (k·p)/(k·q) for k ∈ ℤ \ {0}.

In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.

Full derivation

Step 1 (sign normalization). If b < 0, replace (a, b) by (−a, −b). Likewise for the second fraction.

Step 2 (operation). For a sum: num = a·d + c·b, den = b·d. For a difference: num = a·d − c·b. For a product: num = a·c, den = b·d. For a quotient: num = a·d, den = b·c (requires c ≠ 0).

Step 3 (reduction). g = gcd(|num|, |den|); result = (num/g)/(den/g) with positive den. Euclid’s algorithm terminates because remainders decrease in ℕ.

Step 4 (correctness). Equality in ℚ follows from the class definition: (a/b) + (c/d) = (ad + cb)/(bd) is independent of representative after reduction. Axiomatic treatments: Lang, Undergraduate Algebra; Hardy & Wright for GCD.

In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.

Special cases

Examples: 1/2 + 1/3 = 5/6; 3/4 − 1/4 = 1/2; (2/3)·(3/5) = 2/5; (1/2)÷(1/4) = 2/1; simplify 12/18 → 2/3. Mixed numbers (e.g. 1 1/2) are a display of |p| = q·whole + remainder, not a separate data type.

Division by 0/d or by c = 0 is rejected. Negative numerators are allowed; −2/4 reduces to −1/2. Two zero numerators with a nonzero denominator yield 0/1.

In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.

Numerical and computational notes

Fields accept integers only (validation ^-?\d+$). Intermediate products a·d may leave the range of exactly representable integers; with extreme values floating-point arithmetic loses integer exactness above 2⁵³. For typical school tasks the range is enough.

A comma in an integer field is rejected (this is not the decimal converter). The panel shows a decimal form, the GCD, and optionally LCM and a mixed form.

In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.

Related concepts and authorities

Related: decimal-to-fraction (the reverse direction via continued fractions), floor, and fractional part. This calculator does not compute fractional powers or roots.

Authorities: Euclid, Elements VII; Knuth, TAOCP §4.5; MathWorld — Fraction, Euclidean Algorithm; NIST DLMF §1.1. Educational tool — not a substitute for written exams.

In classroom practice it helps to separate the mathematical formula from floating-point limits: this calculator reports the browser’s floating-point computation (about 15–16 significant digits), not a symbolic identity on paper. When inputs are extreme, check the domain first, then the floating-point range.

How to use

  1. Choose add, subtract, multiply, divide, or reduce one fraction.
  2. Enter the numerator and denominator as whole numbers. For two fractions fill both pairs, for example 1/2 and 1/3.
  3. Choose Calculate. The main result is already reduced. Beside it you see the decimal, the form before reducing, the GCD, the LCM (for +/−), and a mixed form when it applies.
  4. Keep the denominator different from zero. To reduce 2/4 the first pair is enough. For +/− the bars show size relative to a whole of 1.

Symbol glossary

1/2 + 1/3 = 5/6. Common denominator 6 gives 3/6 + 2/6. The sum 5/6 does not reduce further.

a, c
Numerators (the “Numerator” and “Numerator” fields). Whole numbers, may be negative.
b, d
Denominators (ulamki-b, ulamki-d). Whole numbers and nonzero.
GCD
Greatest common divisor. For 6 and 20 it is 2, so 6/20 → 3/10. Euclidean algorithm.
LCM
Least common multiple of the denominators. LCM(2,3) = 6. Shown for +/− in the panel.
5/6
1/2 + 1/3 after bringing both to denominator 6.

Examples

Example 1

  • Operation: add
  • 1/2 and 1/3

5/6

1/2 + 1/3 = 5/6, because 3/6 + 2/6. As a decimal ≈ 0.8333.

Example 2

  • Operation: multiply
  • 3/4 and 2/5

3/10

3/4 × 2/5 = 6/20 → 3/10 after reducing by 2.

Example 3

  • Operation: reduce one fraction
  • 2/4

1/2

GCD(2,4) = 2, so 2/4 → 1/2.

Example 4

  • Operation: subtract
  • 3/4 and 1/4

1/2

3/4 − 1/4 = 2/4 → 1/2 after reducing.

Example 5

  • Operation: divide
  • 1/2 and 1/4

2

(1/2) ÷ (1/4) = (1/2)×(4/1) = 2.

Related calculators

Frequently asked questions

How does adding two fractions work?

The algebraic common denominator is the product of both denominators: a/b + c/d = (ad + bc)/(bd), then reduce by the GCD. For 1/2 + 1/3: 3/6 + 2/6 = 5/6 ≈ 0.8333. LCM(2,3) = 6 equals the product because GCD(2,3) = 1.

How does multiplying fractions work?

Multiply numerators together and denominators together: (a/b)·(c/d) = (ac)/(bd), then reduce. For 3/4 × 2/5 first 6/20, then reduce by GCD = 2 to get 3/10 = 0.3.

How do you reduce one fraction?

Divide the numerator and denominator by their greatest common divisor (Euclidean algorithm, Euclid’s Elements Book VII). For 2/4 the GCD is 2, so the result is 1/2.

Can the denominator be zero?

No. A fraction a/b is defined only when b ≠ 0. The calculator rejects a zero denominator instead of showing a misleading result.

Do the numerator and denominator have to be whole numbers?

Yes. The fields accept only integers. Enter 3/2 instead of 1.5. There is no mixed-number input — a mixed form appears in the result panel when |numerator| ≥ denominator.

Why is the common denominator the product, not always the LCM?

The product b·d is always a common multiple. LCM(b,d) = |b·d|/GCD(b,d) is the least such multiple. After reducing by the GCD the result is the same. The calculator uses the product and shows the LCM beside add and subtract.

How do you divide fractions?

Multiply the first fraction by the reciprocal of the second: (a/b) ÷ (c/d) = (a/b)·(d/c) = (ad)/(bc), provided c ≠ 0. Example: (1/2) ÷ (1/4) = (1/2)×(4/1) = 2.

What about a minus in the denominator?

The sign moves to the numerator. −1/2 and 1/−2 give the same result −1/2, because the canonical denominator is positive.

When is the result a whole number or a mixed number?

When the reduced denominator is 1, the main result is a whole number (for example 4/2 → 2). When |numerator| ≥ denominator and the denominator is greater than 1, the panel also shows a mixed form, for example 7/3 → 2 1/3.

How is this different from the fractional part and a fractional power?

The fractional part is what remains after subtracting the integer part (for example 0.25 from 3.25). A fractional power is x^(m/n). Here you compute operations on two fractions or reduce one fraction.

How do you check that two fractions are equal?

a/b = c/d (with b,d ≠ 0) if and only if ad = bc (cross-multiplication). That is not a separate calculator mode — it is an identity for checking, for example 2/4 = 1/2 because 2·2 = 4·1.

Do the currency and unit settings in the page header affect the result?

No. The result depends only on the operation and the four whole numbers in the form. The currency and unit settings in the page header do not affect this result.

The result is a reduced fraction: for 1/2 + 1/3 the sum is 5/6. GCD and LCM appear in the panel. A standalone divisor tool is on the GCD page.

Sources

Fraction operations, the GCD, and the domain b ≠ 0 come from standard arithmetic.

Page updated October 14, 2026.