Intermediate

Egyptian Fraction Calculator — Unit Fraction Decomposition

Express any positive fraction as a sum of distinct unit fractions (1/2 + 1/4 + ...) using the Fibonacci–Sylvester greedy algorithm — as recorded in the Rhind Mathematical Papyrus circa 1650 BCE.
Egyptian fraction
3/4 = 1/2 + 1/4
Number of unit fractions
2
Decimal value
0.75
Reduced fraction
3/4
Unit fractions
1/2 + 1/4
Greedy algorithm steps
1

Step 1: ⌈4/3⌉ = 2, take 1/2

3/4 − 1/2 = 2/8
=

Numerator = 1 → take 1/4

1/4
=

Egyptian fraction decomposition

3/4 = 1/2 + 1/4
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

An Egyptian fraction writes p/q as a sum of distinct unit fractions using the greedy algorithm: at each step take 1/⌈q/p⌉ and subtract it. For example, 3/4 = 1/2 + 1/4. The Fibonacci–Sylvester algorithm always terminates, though it may produce large denominators for some inputs.

Formula
Greedy: while p/q > 0, take 1/⌈q/p⌉, remainder = p/q − 1/⌈q/p⌉, reduce by GCD, repeat
How this is calculated

An Egyptian fraction is a sum of distinct unit fractions — fractions with numerator 1, such as 1/2, 1/3, 1/7. Ancient Egyptians (and their scribes) wrote all fractions this way in arithmetic tables; the Rhind Papyrus (c. 1650 BCE) lists decompositions for fractions from 2/3 through 2/101. Every positive rational number p/q has an Egyptian fraction representation, and the Fibonacci–Sylvester greedy algorithm always finds one.

The algorithm works by repeatedly subtracting the largest unit fraction that does not exceed the current remainder. At each step: compute n = ⌈q/p⌉ (the ceiling of q/p), record 1/n as the next term, and update the remainder to p·n − q over q·n, then reduce by the GCD. Because each step reduces the numerator (p·n − q < p when n > q/p), the algorithm terminates in a finite number of steps. The decomposition produced by the greedy method is not unique — other algorithms (e.g. splitting a fraction via the formula 2/(2k+1) = 1/(k+1) + 1/((k+1)(2k+1))) can produce shorter or different representations.

For most small fractions the greedy algorithm finishes in 2–5 steps, but adversarial inputs can produce very large denominators. This calculator caps the iteration at 20 steps and denominators at 10^15 to stay within JavaScript's safe integer range. If the decomposition is cut short, reduce or simplify the input fraction first.

Frequently asked questions

The Egyptian numeral system had special symbols only for unit fractions (and 2/3). Their arithmetic was additive, making unit fractions natural for problems like dividing loaves of bread among workers — the Rhind Papyrus contains detailed tables of decompositions precisely for this purpose.

No. For example 2/3 can be written as 1/2 + 1/6, or 1/3 + 1/3 (but with distinct fractions: 1/2 + 1/6 only). Different algorithms produce different valid decompositions. The greedy algorithm always gives a valid answer but not necessarily the shortest one.

For every integer n ≥ 2, the fraction 4/n can be written as the sum of at most three distinct unit fractions: 4/n = 1/a + 1/b + 1/c. This has been verified for all n up to 10^14 but not yet proved for all integers — it remains one of the oldest open problems in number theory.

Also known as

egyptian fraction decomposition
unit fraction sum calculator
fraction as sum of unit fractions
greedy algorithm fraction decomposition
fibonacci sylvester algorithm
ancient egyptian arithmetic fractions
rhind papyrus fraction calculator

APA

TG we-Calculate Editorial Team. (2026). Egyptian Fraction Calculator — Unit Fraction Decomposition [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/egyptian-fraction-calculator

Chicago

TG we-Calculate Editorial Team. "Egyptian Fraction Calculator — Unit Fraction Decomposition." TG we-Calculate. 2026. https://we-calculate.com/calculator/egyptian-fraction-calculator.

IEEE

TG we-Calculate Editorial Team, "Egyptian Fraction Calculator — Unit Fraction Decomposition," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/egyptian-fraction-calculator

BibTeX

@misc{wecalculate_egyptian_fraction_calculator, title = {Egyptian Fraction Calculator — Unit Fraction Decomposition}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/egyptian-fraction-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?