Yes, you can (should) add the selling costs - getting ready to sell, painting, selling commissions etc. to the basis.
Capital gain = sales price MINUS basis
and Basis is purchase price + improvements + those selling costs
And Long-term gains and qualified dividends
are taxed at ...
*0% if taxable income
falls in the 10% or 15% marginal tax brackets
*15% if taxable income falls in the 25%, 28%, 33%, or 35% marginal tax brackets
*20% if taxable income falls in the 39.6% marginal tax bracket
So depending on your other household income for the year, you may have a zero tax or as high as 20% ... ON that gain (selling price minus basis).
But again, yes, you CAN add your selling costs (plus any improvements you made to the house) TO the purchase price to et to a higher basis, which will lower that taxable gain
Let me know if you have questions ...