Audited ·Last updated 27 Jul 2026·6 citations·Tier 1·0 uses

Fraction Calculator

Free fraction calculator: add, subtract, multiply, and divide two fractions. Results simplified via GCD with decimal and mixed-number form.

Fraction Calculator

The top number of the first fraction a/b. Must be an integer. Sign is preserved — −3/4 is entered as numerator −3, denominator 4. Zero is allowed (0/anything = 0).
The bottom number of the first fraction a/b. Must be a non-zero integer. If you enter a negative denominator the engine flips both signs internally so the displayed denominator stays positive — −3/−4 is reported as 3/4.
The top number of the second fraction c/d. Must be an integer. For division (a/b ÷ c/d) the numerator c must be non-zero — dividing by 0/d is undefined.
The bottom number of the second fraction c/d. Must be a non-zero integer.
Operation
Result numerator
3
The numerator of the simplified result. The sign of the result lives on the numerator — if the answer is negative, this number is negative and the denominator is positive. For 1/2 + 1/4 = 3/4 this output is 3. For 2/3 − 5/6 = −1/6 this output is −1. The fraction is always returned in lowest terms (gcd(|numerator|, denominator) = 1).
Result denominator
4
Decimal value
0.75
Improper / mixed flag
0
Whole part (mixed number)
0
Fractional numerator (mixed number)
3

Background.

The Quanta fraction calculator adds, subtracts, multiplies, and divides any two fractions a/b and c/d, returns the answer reduced to lowest terms, and reports the decimal value and the mixed-number form alongside the simplified fraction. Enter 1/2 + 1/4 and it returns 3/4 (decimal 0.75, not improper). Enter 2/3 × 3/4 and it returns 1/2 (the engine simplifies 6/12 by dividing both by gcd(6, 12) = 6). Enter 7 ÷ 3 as 7/1 divided by 3/1 (or just 7/3 as a single fraction) and it returns 7/3, decimal 2.333…, mixed form 2 1/3. Every result is in lowest terms because the engine applies the Euclidean algorithm — Euclid's Elements Book VII, Proposition 2, written down in roughly 300 BC and still the fastest known way to compute a greatest common divisor on small integers — to divide both numerator and denominator by their gcd before returning.

Fractions matter because they are the only way to write exact rational numbers in computer arithmetic. The decimal 0.1 cannot be represented exactly in any binary floating-point format — it has an infinite repeating expansion 0.0001100110011… in base 2, and IEEE 754 doubles round it to the nearest representable value, which is approximately 0.1000000000000000055511151231257827021181583404541015625. By contrast the fraction 1/10 is exact in rational arithmetic; the numerator is 1 and the denominator is 10 and there is no rounding. The same is true for every rational number, which is why CAS systems like SageMath and Mathematica, financial libraries like Java's BigDecimal in fractional mode, and theorem provers like Coq and Lean represent rationals as integer numerator/denominator pairs rather than as decimals. Even a simple arithmetic problem like '1/3 + 1/3 + 1/3 = ?' goes wrong in decimal (0.333… + 0.333… + 0.333… = 0.999… ≠ 1.0 under naive rounding) but is trivially 1 in fraction form (1/3 + 1/3 + 1/3 = 3/3 = 1/1).

The mathematics behind the calculator is the same arithmetic of rationals that Euclid laid out in Book VII of the Elements and that Hardy and Wright codify in the opening section of An Introduction to the Theory of Numbers. To add or subtract you must reach a common denominator — the standard technique is to cross-multiply (a/b ± c/d = (a·d ± c·b)/(b·d), which always works but may not give the lowest common denominator, so the engine simplifies afterward). To multiply you multiply numerators and denominators straight across (a/b × c/d = (a·c)/(b·d)) — no common denominator is needed because multiplication of fractions is multiplication of two single rational numbers, not a comparison across a common scale. To divide you multiply by the reciprocal (a/b ÷ c/d = a/b × d/c = (a·d)/(b·c)), which is the same identity as 'invert and multiply' that every school textbook teaches.

After the operation the engine simplifies via gcd: if gcd(|raw numerator|, raw denominator) is g, then the simplified pair is (raw numerator / g, raw denominator / g). The engine also normalises the sign so the denominator is always positive — if the formula produces 3/−4 the engine flips both signs to give −3/4, which is the canonical form preferred by every reference text.

A fraction whose absolute value is at least 1 is called improper and admits a mixed-number representation: divide |numerator| by denominator with integer division to get the whole part, the remainder is the new numerator, and the sign is reattached. So 7/3 becomes 2 1/3 (because 7 = 2·3 + 1) and −7/3 becomes −(2 1/3) (same magnitude, sign reattached). The Quanta engine reports wholePart and fractionalNumerator separately so a UI can display either form.

Whatever brought you to a fraction calculator — homework on adding fractions with unlike denominators, a recipe that wants 2/3 cup tripled (3 × 2/3 = 2/1 = 2 cups), a sewing pattern in inches and sixteenths, a music theory problem about subdividing a 4/4 bar into triplets — the calculator above and the explainer below cover every variant of the question with primary-source citations to Knuth, Euclid, Hardy and Wright, Lang's Algebra, and the NIST Digital Library of Mathematical Functions.

What is fraction calculator?

A fraction is an ordered pair of integers, the numerator and the denominator, representing the rational number obtained by dividing one by the other. The fraction a/b means a ÷ b — the number that, when multiplied by b, gives a. The denominator b is required to be non-zero because division by zero is undefined. A fraction is in lowest terms (or 'reduced') when gcd(|a|, b) = 1 — that is, when the numerator and denominator share no common factor other than 1. Every rational number has a unique lowest-terms representation if we further require the denominator to be positive (so the sign lives on the numerator). For example 6/8 is not in lowest terms because gcd(6, 8) = 2; the lowest-terms form is 3/4. The number 2/3, by contrast, is already in lowest terms because gcd(2, 3) = 1. Fractions are classified as proper when |a| < b (absolute value strictly less than 1) and improper when |a| ≥ b (absolute value at least 1). An improper fraction can be rewritten as a mixed number — a whole-number part plus a proper fractional part — by integer division: a = q·b + r with 0 ≤ r < b, giving a/b = q + r/b. So 7/3 has q = 2 and r = 1, written as the mixed number 2 1/3 (read 'two and one third'). Mixed numbers are common in everyday measurement (a recipe might ask for 2 3/4 cups of flour, a wrench might be 5/8 inch, a board might be 8 1/2 feet long) and improper fractions are common in algebra (where mixing addition and a fractional part inside the same numeric token is awkward — 2 + 1/3 reads more clearly than 2 1/3 in an expression like 3·(2 + 1/3) ≠ 3·2·1/3). The Quanta engine reports both forms, so whichever you need is one click away. The arithmetic of fractions follows four rules. Addition: a/b + c/d = (a·d + c·b)/(b·d). Subtraction: a/b − c/d = (a·d − c·b)/(b·d). Multiplication: a/b × c/d = (a·c)/(b·d). Division: a/b ÷ c/d = (a·d)/(b·c), provided c ≠ 0. The first two operations require a common denominator (here, the product b·d, which is always a common denominator but rarely the smallest); the third and fourth do not. All four are theorems of elementary ring theory — the rational numbers ℚ form a field under these operations, with 0/1 as additive identity, 1/1 as multiplicative identity, the additive inverse of a/b being −a/b, and the multiplicative inverse of a/b (when a ≠ 0) being b/a. See Lang, Algebra, Chapter 1, §1 ('Monoids and Groups') and §2 ('Rings and Fields') for the abstract construction, or Hardy and Wright §1.1 for the concrete elementary number-theoretic treatment.

How to use this calculator.

  1. Enter the first fraction a/b in the two numbered fields labelled 'First numerator' and 'First denominator'. Both must be integers. The denominator must be non-zero. Signs go on whichever field is convenient — −3/4, 3/−4, and (−3)/4 all represent the same rational number, and the engine normalises the sign so the displayed denominator stays positive.
  2. Enter the second fraction c/d in the 'Second numerator' and 'Second denominator' fields. Same rules: integers, non-zero denominator. For division the second numerator c must additionally be non-zero (you cannot divide by 0/d, which equals zero). The engine reports an explicit InvalidInputError if you try.
  3. Pick the operation from the dropdown: add (a/b + c/d), subtract (a/b − c/d), multiply (a/b × c/d), or divide (a/b ÷ c/d). The dropdown is the only structural input — everything else is integer arithmetic — so changing the operation immediately updates every result without you needing to re-enter anything.
  4. Read the primary output — the result numerator. The sign of the answer lives on the numerator (the denominator is always positive). For 1/2 + 1/4 the result numerator is 3 and the result denominator is 4, so the answer is 3/4.
  5. Read the result denominator alongside. Together the numerator and denominator give the lowest-terms fraction. The engine reduces by the gcd before returning, so 2/3 × 3/4 = 6/12 is reported as 1/2 (gcd 6 has been divided out).
  6. Read the decimal output for a sense of magnitude — useful when you need to feed the fraction into a downstream calculator that does not handle fractions. 3/4 is exactly 0.75; 1/3 is approximately 0.333333…; 22/7 is approximately 3.142857… (a famous π approximation that is not π exactly).
  7. Read the mixed-number outputs (isMixed, wholePart, fractionalNumerator) when the result is improper. For 7/3 these are isMixed = 1, wholePart = 2, fractionalNumerator = 1, displayed as the mixed number 2 1/3. For 1/2 they are isMixed = 0, wholePart = 0, fractionalNumerator = 1 — i.e. the answer is already a proper fraction so no mixed form is needed.
  8. For multi-step expressions chain the calculator: compute (1/2 + 1/3) first, take the result (5/6), then add the next term using 5 and 6 as the new first fraction. The associativity of addition and multiplication guarantees the same final answer regardless of how you parenthesise.

The formula.

a⁄b + c⁄d = (a·d + c·b) ⁄ (b·d)

All four operations are theorems of the field of rational numbers. ADDITION. a/b + c/d = (a·d + c·b)/(b·d). The product b·d is always a common denominator because both b·d/b = d and b·d/d = b are integers, so multiplying a/b by d/d (which equals 1, so the value is unchanged) gives (a·d)/(b·d), and multiplying c/d by b/b gives (c·b)/(b·d), and now both fractions share the denominator b·d and can be added by adding numerators. The result (a·d + c·b)/(b·d) is rarely in lowest terms — b·d is the product of the two original denominators, but the lowest common denominator is lcm(b, d) = b·d/gcd(b, d), which is smaller whenever b and d share a common factor. The Quanta engine deliberately uses the product b·d in the raw formula and then reduces via the gcd of the resulting numerator and denominator — this is one division at the end, instead of an lcm computation before the addition, and produces exactly the same lowest-terms answer. SUBTRACTION. a/b − c/d = (a·d − c·b)/(b·d). Identical derivation, with a minus sign. MULTIPLICATION. a/b × c/d = (a·c)/(b·d). No common denominator is needed. Multiplication of fractions is the multiplicative operation of the field ℚ, which is constructed from the integers ℤ by quotienting the pair (a, b) by the equivalence relation (a, b) ~ (a', b') iff a·b' = a'·b. Under this construction the product (a, b)·(c, d) is defined to be (a·c, b·d) — the obvious componentwise rule — and the well-definedness of the product is a one-line check using the equivalence relation. Beginners often try to multiply fractions by cross-multiplying first, but cross-multiplying is unnecessary and produces the wrong rule: (a·d)·(c·b)/(b·d)·(b·d) is not (a·c)/(b·d). The right rule for multiplication is multiply straight across. DIVISION. a/b ÷ c/d = a/b × d/c = (a·d)/(b·c). The classical school formulation is 'invert and multiply' — to divide by a fraction, flip the divisor upside down and multiply. The derivation is one line: a/b ÷ c/d is the unique x such that x·(c/d) = a/b; multiplying both sides by d/c gives x = (a/b)·(d/c). Division is undefined when the divisor is zero, which for fractions means c = 0 (the case d = 0 was already excluded as a malformed input). The Quanta engine raises an explicit InvalidInputError for this case. SIMPLIFICATION. After every operation the engine reduces the raw fraction by computing g = gcd(|raw numerator|, raw denominator) using the Euclidean algorithm (Euclid's Elements Book VII, Proposition 2: gcd(x, y) = gcd(y, x mod y), with gcd(x, 0) = x as the base case), then dividing both numerator and denominator by g. The Euclidean algorithm runs in O(log min(x, y)) integer divisions on inputs x, y — the proof that the number of steps is bounded by ~5 log₁₀(min(x, y)) is Gabriel Lamé's 1844 theorem on the worst-case Fibonacci inputs (see Knuth TAOCP Volume 2 §4.5.3). For the small integers handled by this calculator (well within JavaScript's 2⁵³ − 1 safe integer range) every gcd completes in microseconds. SIGN NORMALISATION. Finally the engine ensures the displayed denominator is positive. If the raw denominator came out negative — which happens for division when n2 is negative, or whenever the user enters a negative denominator — the engine flips the sign of both numerator and denominator, so the result obeys the convention that denominators are strictly positive integers and signs live on the numerator. EXACTNESS. Throughout the pipeline the engine uses JavaScript Number arithmetic on integers within the safe-integer range (|n| ≤ 2⁵³ − 1 = 9,007,199,254,740,991). For numerators and denominators within ±10⁷ — far beyond any practical fraction problem — every intermediate product a·d, c·b, a·c, b·d, b·c remains well within the safe range, so multiplication is exact and gcd is exact and the final result is exact. This is the principal advantage of fraction arithmetic over decimal arithmetic: 1/3 + 1/6 in decimal becomes 0.333333… + 0.166666… = 0.499999… (off by 1 ULP from 0.5 under IEEE 754 rounding), but in fractions it is (1·6 + 1·3)/(3·6) = 9/18 = 1/2 exactly.

A worked example.

Example

Take 1/2 + 1/4. The engine reads n1 = 1, d1 = 2, n2 = 1, d2 = 4, operation = 'add'. All four integer checks pass. Both denominators are non-zero. The addition rule a/b + c/d = (a·d + c·b)/(b·d) gives raw numerator = 1·4 + 1·2 = 4 + 2 = 6 and raw denominator = 2·4 = 8. Simplify. gcd(|6|, 8): apply Euclid 8 = 1·6 + 2 (so gcd(8, 6) = gcd(6, 2)); 6 = 3·2 + 0 (so gcd(6, 2) = gcd(2, 0) = 2). The gcd is 2. Divide numerator and denominator by 2: 6/2 = 3 and 8/2 = 4. So the simplified result is 3/4. Sign normalisation: denominator 4 is already positive, no sign flip. Decimal: resultDecimal = 3 / 4 = 0.75 exactly. Mixed form: |3| < 4 so isMixed = 0 (proper fraction). wholePart = Math.floor(0.75) = 0. fractionalNumerator = 3 − 0·4 = 3. So the outputs are resultNumerator = 3, resultDenominator = 4, resultDecimal = 0.75, isMixed = 0, wholePart = 0, fractionalNumerator = 3. Two further illustrative runs the same engine handles. (1) 2/3 × 3/4. Multiplication: raw = (2·3)/(3·4) = 6/12. gcd(6, 12) = 6. Simplified: 1/2. Decimal 0.5. Mixed form: isMixed = 0, wholePart = 0, fractionalNumerator = 1. (2) 7 ÷ 3 entered as 7/1 ÷ 3/1. Division rule: raw = (7·1)/(1·3) = 7/3. gcd(7, 3) = 1 (7 and 3 are coprime). Already in lowest terms. Decimal: 7/3 ≈ 2.333333…. Mixed form: |7| ≥ 3 so isMixed = 1. wholePart = Math.floor(2.333…) = 2. fractionalNumerator = 7 − 2·3 = 1. Displayed mixed form: 2 1/3. The original computation 7/3 = 2 1/3 confirms a textbook example.

n11
n21
d12
operationadd
d24

Frequently asked questions.

How does the calculator simplify fractions to lowest terms?
It divides both numerator and denominator by their greatest common divisor (gcd), computed by the Euclidean algorithm. Euclid's algorithm is the recursion gcd(x, y) = gcd(y, x mod y) with base case gcd(x, 0) = x, first written down in Euclid's Elements Book VII, Propositions 1 and 2, circa 300 BC, and still the standard method 2,300 years later because nothing faster has been found for small integers. Concretely, to simplify 6/8: gcd(6, 8): 8 mod 6 = 2, so gcd(8, 6) = gcd(6, 2); 6 mod 2 = 0, so gcd(6, 2) = gcd(2, 0) = 2. The gcd is 2. Divide both: 6/2 = 3 and 8/2 = 4. The lowest-terms form is 3/4. The same procedure handles every fraction the calculator returns. Lamé's 1844 theorem (Knuth TAOCP Vol 2 §4.5.3) bounds the number of Euclidean steps by ~5 log₁₀(min(x, y)) — the worst case is consecutive Fibonacci numbers — so even pathological inputs complete in microseconds for the small integers the calculator supports.
What is the difference between a common denominator and the lowest common denominator (LCD)?
A common denominator of two fractions a/b and c/d is any positive integer that is a multiple of both b and d. The lowest common denominator (LCD) is the smallest such integer, equal to lcm(b, d) = b·d / gcd(b, d). For 1/4 and 1/6 a common denominator is 4·6 = 24, but the LCD is lcm(4, 6) = 12. Why does it matter? Working in the LCD keeps numerators small and reduces the simplification burden at the end. For 1/4 + 1/6 via the product denominator 24: raw = (1·6 + 1·4)/24 = 10/24, simplify by gcd(10, 24) = 2 to get 5/12. Via the LCD 12: 1/4 = 3/12 and 1/6 = 2/12, sum = 5/12 directly. Same answer either way. The Quanta engine deliberately uses the product b·d rather than the LCD because one final gcd divide is cheaper than computing lcm(b, d) upfront and then still possibly simplifying at the end — and the result is identical down to the last digit. For mental arithmetic the LCD is usually faster; for software the product-then-simplify path is simpler and equally correct.
How do I add or subtract mixed numbers like 2 1/3 + 1 1/4?
Two methods, both supported by the calculator if you do one quick conversion. Method 1: convert each mixed number to an improper fraction first, add as improper fractions, convert back. 2 1/3 = (2·3 + 1)/3 = 7/3. 1 1/4 = (1·4 + 1)/4 = 5/4. Enter 7/3 + 5/4 in the calculator (operation = add). It returns (7·4 + 5·3)/(3·4) = (28 + 15)/12 = 43/12 raw, gcd(43, 12) = 1 so already in lowest terms. Decimal 3.5833…. Mixed form: 43 = 3·12 + 7, so wholePart = 3 and fractionalNumerator = 7. Final mixed answer: 3 7/12. Method 2: add the whole parts and the fractional parts separately, then borrow if needed. Whole parts: 2 + 1 = 3. Fractional parts: 1/3 + 1/4 = 7/12 (which the calculator confirms). Combine: 3 + 7/12 = 3 7/12. Identical answer, fewer arithmetic steps. For subtraction the same two methods apply, with the standard borrowing trick when the fractional part of the minuend is smaller than the fractional part of the subtrahend.
Why does multiplying fractions not require a common denominator?
Because multiplication is the operation that the rational field ℚ is built around, and the product rule (a, b)·(c, d) = (a·c, b·d) is its definition. There is nothing to align. Adding two fractions requires the same denominator because addition compares quantities — to add 1/3 to 1/4 you must convert them to the same scale, namely twelfths, so that 4/12 + 3/12 = 7/12 is a single comparable count of twelfths. Multiplication does not compare; it scales. 1/3 × 1/4 means 'one-third of one-quarter', which is a well-defined geometric operation independent of any common scale: take a quarter (the strip), divide it into thirds (giving three sub-strips each 1/12 of the original whole), take one of them. The result is 1/12 — and that is what (1·1)/(3·4) = 1/12 gives directly. Lang, Algebra, Chapter 1 develops this rigorously: a fraction is a member of the field of fractions Frac(ℤ) of the integers ℤ, and the multiplicative structure on Frac(ℤ) is defined componentwise on representatives. Addition is also defined componentwise once you reduce to a common denominator; multiplication needs no reduction step. School arithmetic obscures this because the addition rule (cross-multiply, then add) and the multiplication rule (multiply straight across) look superficially similar — but they are doing different things mathematically.
How does dividing fractions work — why 'invert and multiply'?
Because the multiplicative inverse of c/d in the field ℚ is d/c (provided c ≠ 0), and division by any field element is defined as multiplication by its multiplicative inverse. So a/b ÷ c/d means a/b × (c/d)⁻¹ = a/b × d/c = (a·d)/(b·c). The school mnemonic 'flip the second fraction and multiply' is a literal restatement of this algebraic identity. The derivation in one line: a/b ÷ c/d is the unique x such that x × (c/d) = a/b. Multiply both sides by d/c (which is non-zero, hence has a multiplicative inverse and the multiplication is reversible): x × (c/d) × (d/c) = a/b × d/c, simplifying to x = (a·d)/(b·c). The case c = 0 is excluded because the multiplicative inverse of zero does not exist — division by zero is undefined. The Quanta engine raises an explicit InvalidInputError when you try to divide by 0/d for any d. (Note: dividing 0/d by something non-zero is fine — 0/d ÷ c/d' = 0/(d·c') for any non-zero c, and 0/anything is 0.)
What is the difference between an improper fraction and a mixed number?
They are two ways of writing the same rational number whose absolute value is at least 1. The improper fraction form is a single fraction a/b with |a| ≥ b. The mixed number form is a whole-number part plus a proper fractional part: q + r/b, where a = q·b + r and 0 ≤ r < b. For example 7/3 is the improper form of the rational number two-and-one-third, and 2 1/3 is the mixed form of the same number. Conversion is one integer division: q = ⌊a/b⌋ and r = a − q·b. Conversion back is one multiplication and one addition: a = q·b + r. The Quanta engine reports both — wholePart is q, fractionalNumerator is r, and resultNumerator / resultDenominator is the improper form a/b. Which form to use depends on context. Mixed numbers are better for measurement and human reading (a recipe for '2 3/4 cups of flour' reads naturally; '11/4 cups' reads oddly). Improper fractions are better for algebra (multiplying 3 × (2 1/3) requires expanding the mixed number first, whereas 3 × 7/3 = 21/3 = 7 is one step). Negative numbers need a convention. The calculator uses the floor-based form: −7/3 has wholePart = ⌊−7/3⌋ = ⌊−2.333…⌋ = −3 and fractionalNumerator = −7 − (−3)·3 = 2, giving the canonical mixed form −3 + 2/3 = −(2 1/3).
When is a fraction's decimal expansion exact (terminating) vs repeating?
A fraction a/b in lowest terms has a terminating decimal expansion if and only if the denominator b has no prime factors other than 2 and 5. This is the classical 'terminating decimal' theorem (Hardy & Wright §9.6). Examples that terminate: 1/2 = 0.5, 3/4 = 0.75, 7/8 = 0.875, 1/5 = 0.2, 3/25 = 0.12, 7/40 = 0.175, 9/64 = 0.140625. The denominators 2, 4, 8, 5, 25, 40 = 8·5, 64 are all of the form 2ᵃ · 5ᵇ. Examples that repeat: 1/3 = 0.333…, 1/6 = 0.1666…, 1/7 = 0.142857 142857…, 1/9 = 0.111…, 1/11 = 0.0909…, 5/12 = 0.41666…. The denominators 3, 6 = 2·3, 7, 9, 11, 12 = 4·3 all contain a prime factor other than 2 and 5. The length of the repeating block — the period of the decimal — equals the multiplicative order of 10 modulo (the part of b coprime to 10), which can be anywhere from 1 (for 1/3) up to b − 1 (for 1/7, period 6, the maximum because 10 is a primitive root mod 7). The Quanta calculator reports resultDecimal as a fixed-precision IEEE 754 double, which silently rounds repeating decimals at the 15th significant figure — so the displayed decimal is approximate for any fraction in lowest terms whose denominator is not of the form 2ᵃ · 5ᵇ. The exact fraction is the source of truth; the decimal is a convenience.
Can I add three or more fractions at once?
Not in a single click — the calculator adds exactly two fractions per operation — but chaining gives the same answer because addition is associative. To compute 1/2 + 1/3 + 1/4: first run 1/2 + 1/3 = 5/6 (the engine handles this immediately). Then enter 5/6 as the first fraction (n1 = 5, d1 = 6) and 1/4 as the second (n2 = 1, d2 = 4) and add again: (5·4 + 1·6)/(6·4) = (20 + 6)/24 = 26/24, gcd(26, 24) = 2, simplified to 13/12. So 1/2 + 1/3 + 1/4 = 13/12 = 1 1/12 in mixed form, decimal 1.0833…. The same chaining works for multiplication (multiplication is also associative — 2/3 × 3/4 × 4/5 can be computed as (2/3 × 3/4) × 4/5 = 1/2 × 4/5 = 4/10 = 2/5). Subtraction and division are not associative — (a − b) − c ≠ a − (b − c) in general, and similarly for division — so be careful to evaluate left-to-right or to convert to addition/multiplication with negation/reciprocal first.

References& sources.

  1. [1]Knuth, Donald E. The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd edition. Addison-Wesley, 1997. §4.5.1 ('Fractions') gives the algorithmic treatment of rational arithmetic — the four operations on fractions, the gcd-based reduction to lowest terms, the sign-normalisation convention, and the integer-overflow considerations for finite-precision implementations. §4.5.2 ('The Greatest Common Divisor') covers Euclid's algorithm, including Lamé's theorem (1844) bounding the number of steps by 5·log₁₀(min(x, y)) on the Fibonacci-pair worst case.
  2. [2]Euclid. Elements, Book VII, Propositions 1 and 2 (circa 300 BC). The earliest surviving formulation of the Euclidean algorithm for the greatest common divisor — Proposition 2 gives the iterative procedure 'When two unequal numbers are set out, and the less is continually subtracted from the greater, until a number is left which measures the one before it…'. Heath's 1908 English translation is the standard scholarly reference.
  3. [3]Hardy, G. H. and Wright, E. M. An Introduction to the Theory of Numbers, 6th edition, revised by Heath-Brown and Silverman. Oxford University Press, 2008. §1.1 ('Divisibility of integers') and §1.2 ('Prime numbers') establish the elementary properties of gcd and coprimality that justify fraction simplification. §9.6 ('Decimals with a recurring period') proves the terminating-decimal theorem cited in the FAQ on decimal expansions.
  4. [4]Lang, Serge. Algebra, revised 3rd edition. Graduate Texts in Mathematics 211, Springer, 2002. Chapter 1 §1 ('Monoids and Groups') and §2 ('Rings and Fields') give the rigorous algebraic construction of the rational numbers ℚ as the field of fractions of the integer ring ℤ, including the equivalence-relation definition of a fraction, the well-definedness of addition and multiplication on equivalence classes, and the multiplicative inverse formula (a/b)⁻¹ = b/a that justifies the 'invert and multiply' rule for division.
  5. [5]NIST Digital Library of Mathematical Functions, §1.2 ('Elementary Algebra'), and §27.1 ('Multiplicative Number Theory: Special Notation'). NIST's authoritative reference for gcd notation, divisibility, and the elementary identities underlying fraction simplification, with cross-references to the Hardy–Wright and Knuth treatments.
  6. [6]Smith, David Eugene. History of Mathematics, Volume 2: Special Topics of Elementary Mathematics. Ginn and Company, 1925 (Dover reprint, 1958). Chapter IV ('Arithmetic') §§4–9 and Chapter V ('Algebra') trace the historical development of fraction notation and the four-operation rules from Babylonian sexagesimal fractions through Egyptian unit fractions, Greek ratios, medieval Arabic mathematics, and the modern European synthesis culminating in the standard rules used today.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon