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