Deductions & credits

maybe, you have provided no info about the house.   so assuming it's your personal residence, never rented,  and owned and occupied by you as your principal residence for any 2 years in the 5 years before the sale, it's eligible for the home sale exclusion.  $250K if you are single $500K if married and the spouse occupied it for the 2 years in 5. the period you occupied it and your spouse occupied it does not have to be the same.  the purchase of a new house is irrelevant.