Sayyiduna Kharijah bin Zayd (may Allah have mercy on him) narrates from his father (Sayyiduna Zayd bin Thabit (may Allah be pleased with him)) that the inheritance of children (is ruled as follows): when a man or a woman dies and leaves one daughter, she has a half. If there are two or more (daughters), they have two-thirds. If there is a male (son) with them, none of them has a fixed share; rather, if anyone with a fixed share shares with them, one begins with him and gives him his share, and whatever (wealth) remains after that is between them, for the male the like of the share of two females. He said: The position of the sons' children, when there is no child above them, is exactly like that of the children; that is, grandsons and granddaughters through a son are like sons and daughters. They (the grandchildren) inherit as (the sons and daughters) inherit, and they block (others) as they block. If children and son's children come together and there is a male among the children, then none of the son's children has any inheritance alongside him. If there is no male among the children and there are two or more daughters, then the son's daughters have no inheritance alongside them, unless there is with the son's daughters a male who stands at their level in relation to the deceased, or is more distant than them; then he passes back to those at his level and those above him among the son's daughters any surplus, if there is a surplus, and they divide it "for the male the like of the share of two females." If nothing is left over, they get nothing. If the children consist of only one daughter, and he leaves a son's daughter or more son's daughters at one level, they have a sixth to complete the two-thirds. If there is a male with the son's daughters who is at their level, they have neither a sixth nor any fixed share; but if anything is left over after the shares of those with fixed shares, that surplus goes to that male and to the females at his level, for the male the like of the share of two females, and those more distant than them get nothing. If nothing is left over, they get nothing.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12313