The net investment income tax can catch high-income taxpayers off guard because it applies only when your investment income and income level both cross certain thresholds. If you earn dividends, capital gains, rental income, or passive business income, understanding the NIIT can help you plan ahead and avoid an unexpected 3.8 percent tax bill.