Profit sharing is based on the percentage stake of the shareholders. So in the shareholding agreement, it should be clearly specified, who gets what. There are also shareholders who owns preference shares, they get a predefined amount as dividend. The common shareholders are given second priority after preference shareholders.