۞Warismatika ID
﴾ The underlying math ﴿

GCD & LCM

Almost every inheritance calculation rests on two simple integer operations: LCM (Least Common Multiple) to unify fractions, and GCD (Greatest Common Divisor) to simplify them. Grasp both, and the "base of the problem" and "tashih" steps stop feeling mysterious.

Why it matters in faraidh

GCD — Greatest Common Divisor

FPB

The largest number that divides two or more integers exactly. Used to simplify fractions and ratios.

Way 1 · Factorisation

Take the shared prime factors at the lowest power.

12 = 2² × 3
18 = 2 × 3²
GCD = 2 × 3 = 6
Way 2 · Euclid’s algorithm

Replace the larger with the remainder, repeat until it reaches 0.

18 mod 12 = 6
12 mod 6 = 0
GCD = 6

LCM — Least Common Multiple

KPK

The smallest number that is a multiple of two or more integers. Used to unify denominators — this is the base of the problem in faraidh.

Way 1 · Factorisation

Take all prime factors at the highest power.

4 = 2²
6 = 2 × 3
LCM = 2² × 3 = 12
Way 2 · Via the GCD

LCM(a, b) = a × b ÷ GCD(a, b).

GCD(4, 6) = 2
4 × 6 ÷ 2 = 12
LCM = 12
A worked inheritance example

A man dies leaving a wife (1/8), his mother (1/6), and one son (the residue / 'asabah).

  1. 1. Fixed-share denominators: 8 and 6 → base = LCM(8, 6) = 24.
  2. 2. Shares: wife 1/8 × 24 = 3, mother 1/6 × 24 = 4, residue for the son = 24 − 7 = 17.
  3. 3. With a single son (no split across many heads) there is no tashih. When there are many heirs and the residue does not divide evenly, the GCD is used to simplify before tashih.

Try it in the Calculator — the base it shows is exactly the LCM of the denominators.

Test yourself

GCD & LCM practice