Hi tomamy06 and thanks for writing in today!
Capital gains are calculated as your sales price, minus selling expenses, minus your basis.
Your basis is what you originally paid for the house plus any improvements made. There is no time limit on improvements to count towards your basis; they could be done at any time while you owned the house.
One item to be aware of is that while improvements increase your basis, repairs do not. The difference between an improvement and a repair can get technical and complex, but we do have a great TurboTax article that explains the topic in an easy-to-understand fashion.
I hope this information is helpful!
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"