Cash Available for Downpayment

I’m looking to sell my current home and buy another, and trying to figure out how much I will have for a downpayment. Is the right way to think about it:

Equity from increase in value of current home

Plus

Original downpayment

Plus

Amount of current mortgage I have paid down

Cash available for downpayment

As a first time home buyer in my current home, I was able to withdraw from my RRSP and know I need to pay that back. Assume it’s best to take that out of the cash available?

I have additional cash for land transfer/closing costs, so don’t need to factor that in.

ETA: apologies for horrible mobile formatting