Deductions & credits

Can they be claimed on selling & purchasing.  We purchase & sold a 2nd home.  Trying to claim everything I should on taxes to figure the profit from selling.