Egyptian Fraction Calculator – Sums of Distinct Unit Fractions
An Egyptian fraction writes a positive rational number as a sum of distinct unit fractions — fractions whose numerator is 1. So 5/6 = 1/2 + 1/3 and 4/13 = 1/4 + 1/18 + 1/468. This calculator takes a fraction or a decimal and produces that decomposition four different ways, showing every subtraction along the route and proving the terms add back up to what you started with.
Why Ancient Scribes Wrote Fractions This Way
The Rhind Mathematical Papyrus, copied around 1550 BCE from an older document, opens with a table expressing 2/n for every odd n from 3 to 101 as sums of unit fractions. Egyptian arithmetic had no general notation for a fraction such as three sevenths — apart from a dedicated glyph for 2/3, every quantity had to be a sum of parts. The system was not merely a quirk: unit fractions make dividing goods among people concrete, because 5/6 of a loaf each is literally half a loaf plus a third of a loaf.
The Greedy (Fibonacci–Sylvester) Algorithm
Fibonacci described the standard method in the Liber Abaci of 1202, and Sylvester analysed it in 1880. Given a remaining value p/q, take the largest unit fraction that still fits — that is 1/a with a = ceil(q/p) — subtract it, and repeat on the reduced remainder (p·a − q)/(q·a). The algorithm is guaranteed to finish because the numerator of the remainder strictly decreases every round: p·a − q is always less than p. A strictly falling sequence of positive whole numbers must hit zero.
Short Is Not the Same as Terminating
Termination says nothing about elegance. The famous case is 4/17, where greedy produces 1/5 + 1/29 + 1/1233 + 1/3039345 while a search finds the much tidier 1/5 + 1/30 + 1/510. Denominators can roughly square at each step, so a handful of terms can push a denominator past a hundred digits. The Minimal Terms method runs a bounded exhaustive search instead, using two bounds to keep it fast: the next denominator must be at least q/p, and with k terms left it cannot exceed k·q/p.
The Splitting Identity
The binary or splitting method starts from the naive sum — 2/5 as 1/5 + 1/5 — and repairs the repetition with the identity 1/n = 1/(n+1) + 1/(n(n+1)), giving 1/5 + 1/6 + 1/30. Turn on Allow Repeated Denominators to see the naive starting point before any splitting happens. The method is a lovely demonstration on small numerators but grows quickly on large ones, which is precisely why the greedy approach became the classical choice.
7/3 and the whole part is separated first, giving 2 + 1/3. Enter a decimal such as 0.75 and it is converted to the exact reduced fraction 3/4 before decomposing, producing 1/2 + 1/4.Erdős–Straus and an Open Problem
In 1948 Paul Erdős and Ernst Straus conjectured that every fraction 4/n with n ≥ 2 is a sum of three unit fractions. Even values of n and values with n ≡ 3 (mod 4) fall out of simple identities — for n = 7 you get 4/7 = 1/2 + 1/15 + 1/210. The residue class n ≡ 1 (mod 4) has resisted every attempt at proof for more than seventy-five years, even though computer searches have confirmed it far past 10^17. Erdős–Straus mode switches itself on whenever your input can be rewritten in the 4/n shape.
Exact Arithmetic and Reading the Output
Every calculation runs on big-integer arithmetic, so nothing is rounded and the tool can confirm that the terms sum back to your input before displaying them. The proportional bar shows how much of the value each unit fraction covers, the step table traces the running remainder, and Max Terms stops slow-converging expansions before they run away. If a decomposition stops early you will see the leftover fraction reported instead of a false equals sign — raise the cap, or switch methods, and the calculator finishes the job.