Do I owe recapture or capital gains if I lived in a house 11 of 17 years, rented it out 6? Bought for 80k, sold for 123k. Lived in it when it sold.

I lived in this home 2003 and 2004 then rented it out 2005 to 2010.  Moved back in 2010 until selling in 2020.  What do I need to do regarding recapture for the years it was rented out?  I bought this house for 80k and sold it for 123k.  There were well over 40k in upgrades to the house between 2010 and 2020 when I lived in it again.