One reason taxpayers tend to resent the IRS is that it takes a piece of our hard-earned money — no matter where that money comes from. And while we’re all used to paying taxes on our regular income, capital gains taxes — those applied to investments sold at a profit — can be a pretty harsh blow. But while you can’t get out of paying taxes on your investment gains, you can take steps to lower the rate at which you’re taxed, thus allowing you to keep more of that profit for yourself.