Cash is calculated by adding the company's projected "net free cash flow" to the company's cash balance from the previous period. "Net free cash flow" is equal to the company's net profit after taxes +/- balance sheet changes + depreciation & amortization.
Scroll