Retained earnings is calculated by adding net income to (or subtracting any net losses from) the beginning retained earnings and then subtracting the dividends that were paid to shareholders:
Retained Earnings (RE) = Beginning RE + Net Income – Dividends
This equation is also known as the “retention ratio” or “retained surplus”.
Details of Retained Earnings
Companies retain their earnings to invest in projects or plant improvements that will help the company grow. Examples of these type of investments would be buying machinery or research and development. In general, more mature companies are more likely to have a lower amount of RE compared to dividends whereas younger companies will have far more RE as they try to grow their company and reinvest in their business.
If the net loss for the period is greater than the retained earnings at the beginning of the period, it will be negative, creating a deficit.