Running a business is all about numbers.
Businesses need to raise money from investors and ensure they are using that money in the smartest way possible. From there, it's all about calculating whether your business is making enough money and paying shareholders the dividends they are owed.
Accounting software can be of great assistance when it comes to doing all this math correctly. From there, you should be able to calculate your retained earnings.