Essentially, the cash to close formula is (Down payment + closing costs) - deposits and credits = total cash to close.