The statement of retained earnings can be prepared from the company's balance sheet. The assets, liabilities, and stockholder equity are all considered to ensure the assets match the sum of liabilities and stockholder equity. From this, the net income or loss is calculated and then subtracted from the dividends paid out to get the retained earnings.