Tax Year Prior to 2020: Buying & selling 2nd home

What fees/costs can I claim when purchasing the 2nd home?  What fees/costs can I claim when selling it?  For capital gains.  Add fees to purchase price & deduct fees to selling price.  Owned for 2 years.  Not rental.