If a man dies and leaves behind a wife, three sons and five daughters, and the heirs are limited to these people, then his estate is to be divided as follows:
The wife gets one eighth, because there are descendants of the deceased. Allah, may He be exalted, says (interpretation of the meaning):
“but if you leave a child, they [wives] get an eighth of that which you leave after payment of legacies that you may have bequeathed or debts”
The male and female children get the rest, with each male getting the share of two females, because Allah, may He be exalted, says (interpretation of the meaning):
“Allah commands you as regards your children’s (inheritance); to the male, a portion equal to that of two females”
So the common denominator in this issue is eight. So the wife gets one eighth, which is one share. The remaining seven shares cannot to be divided according to the number of children. The correct way is to divide it into 88 shares, of which the wife gets 11, each male gets 14 and each female gets 7.
The wife’s share = the estate × 11 ÷ 88
= 25,000,000 × 11 ÷ 88 = 3,125,000
The share of each male = the estate × 14 ÷ 88
= 25,000,000 × 14 ÷ 88 = 3,977,272.70
The share of each female = the estate × 7 ÷ 88
= 25,000,000 × 7 ÷ 88 = 1,988,636.30
And Allah knows best.