Do I have to pay capital gain tax if I lived in my property for less than a year and I have around 50k in equity after closing cost..., selling reason is due to crime?

I bought my house in December 2019 for 297k and just accepted an offer yesterday for 365k
I have around 50k in equity after closing cost fees and real state fees. If I put 40k to the down payment of the new property and the rest of the money I use it to buy appliances. Do I have to pay capital gain tax for the 10k or the 40k, since I didn’t live in the House for 2 years or more in the last 5 years? I lived in the house for 11 months and selling reason is due to crime.