Trying to understand porting a mortgage

Hello,

Am trying to understand this porting malarkey.

Lets assume I own a house worth £260k

The remaining mortgage is £120k

I want to port that to a new property and the bank agrees which costs £900k

Forgetting stamp duty and all extra fees, I assume I can take the full £260k and use it as deposit right?

So to work out how much extra I should borrow I'd need to do:

900-260-120 = 520k in NEW mortgage.

So my final mortgage would be £640k.

Or have I got something mixed up there?

Cheers