Qur'anic verses - Case 1:

A man died leaving a wife, five sons and two daughters:

(1) The inheritance is divided into equal shares:

no. of shares, say = 8 x (2 x S + D)

(where, S = no. of sons; D = no. of daughters)

in this case,
8 x (2 x
5 + 2) = 96 shares

(2) The wife, according to verse (4:12), inherits one eighth of the whole inheritance:

wife's shares = 1/8 x 96 = 12

(3) The remaining inheritance is divided between the children in accordance with verse (4:11), such that the male takes twice the share of a female:

(remaining = 96 - 12 = 84 shares)

each daughter = 84 / (2 x S + D) = 84 / 12 = 7 shares

each son = 7 x 2 = 14 shares

God (thus) directs you as regards your Children's (Inheritance): to the male, a portion equal to that of two females.
[Qur'an
4:11]