Cost basis for home after gift of equity - Capital Gains

Mortgage: $150k

 

Gift of equity: $120k

 

Total: $270k

 

Sold home last week for $300k

 

Total cash in hand after close: $126k

 

In short, paid off $150k mortgage, pocketed $126k, for a total net of $276k.

 

Do I owe capital gains taxes on the $276k - $270k = $6k gains (gift of equity increases cost basis)

 

Or do I owe taxes not including the gift of equity: $276k - $150k = $126k gains.

 

Thank you.