Use Form 8960, Net Investment Income Tax to figure the amount of your Net Investment Income Tax (NIIT).
Per the IRS Form 8960 instructions:
Who Must File
Attach Form 8960 to your return if your modified adjusted gross income (MAGI) is greater than the applicable threshold amount.
Application to Individuals
U.S. citizens and residents. Individuals who have for the tax year (a) MAGI that’s over an applicable threshold amount, and (b) net investment income, must pay 3.8% of the smaller of (a) or (b) as their NIIT.
The applicable threshold amount is based on your filing status:
To make entries for Form 8960, Net Investment Income Tax -Individuals, Estates, and Trusts: