How to avoid top tax bracket when selling investment property

Hi, I read that it is wise to sell your investment property in a year when you have low income, so that your marginal tax rate is lower. But anyone who makes more than $180K a year enters the top income tax bracket, and the capital gains on an investment property are generally more than $180K. And you can't just sell half a house. So is it even realistic to try to avoid being in the top tax bracket in the year you sell the investment property? Sorry I am new to this so maybe I am missing something obvious. Thanks a lot for your guidance!