Egyptian Fractions
Decompose any positive rational number a/b into a sum of distinct unit fractions (fractions with numerator 1) — the form used by ancient Egyptians, who had no general notation for m/n. The tool applies the Fibonacci–Sylvester greedy algorithm: at each step it takes the largest unit fraction not exceeding the remainder (the one with denominator ⌈b/a⌉), subtracts it, and repeats — always producing a finite expansion of distinct unit fractions with strictly increasing denominators. Integer parts are extracted first, so improper fractions like 7/4 become 1 + 1/2 + 1/4. Arithmetic is exact (BigInt), so even the famously long expansions (e.g. 5/121) are correct. Everything runs locally in your browser.
Result
Greedy steps
An Egyptian fraction is a representation of a positive rational as a sum of distinct unit fractions 1/n. The greedy algorithm (described by Fibonacci in 1202 and later studied by Sylvester) works as follows: given a remainder a/b (in lowest terms, with 0 < a < b), the largest unit fraction that does not exceed it is 1/⌈b/a⌉, since ⌈b/a⌉ is the smallest integer with 1/q ≤ a/b. Subtract it: a/b − 1/q = (a·q − b)/(b·q), reduce, and repeat. The numerator strictly decreases in a weighted sense and the algorithm provably terminates for every rational, producing denominators that grow strictly (and often explosively — the greedy expansion of 5/121 reaches denominators of 25, 757, 763309, 8736202230049…). Integer parts are pulled out first, so the fractional remainder is always proper. The decomposition is not unique; the greedy one is just the lexicographically smallest (largest first term). Pairs with the Fraction Calculator, Continued Fraction, and GCD/LCM tools. Everything runs locally — nothing leaves your browser.