" I’m going to make around 40k off the home"
If this is the amount you are planning to put in your pocket...that's not how to figure gain.
You take the purchase price and add the cost of any improvements you made to the property, this gives you the basis.
Then you take the selling price and deduct any selling expenses, that gives you your sales price.
The difference between the 2 numbers is your gain or loss. Add that gain to your other income and see which tax bracket you land in, then you'll be able to figure your capital gains tax %.