Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net Investment Income Tax (NIIT) logic #873

Closed
martinholmer opened this issue Aug 24, 2016 · 5 comments
Closed

Net Investment Income Tax (NIIT) logic #873

martinholmer opened this issue Aug 24, 2016 · 5 comments
Labels

Comments

@martinholmer
Copy link
Collaborator

martinholmer commented Aug 24, 2016

After reviewing the NIIT logic, I have some questions. In a development branch I'm working on, the calculation of the NIIT is as follows:

def NetInvIncTax(e00300, e00600, e02000, e26270, c01000,
                 c00100, _feided, NIIT_thd, MARS, NIIT_trt, NIIT):
    """
    NetInvIncTax function computes Net Investment Income Tax amount
    (assume all annuity income is excluded from net investment income)
    """
    modAGI = c00100 + _feided
    NII = max(0., e00300 + e00600 + max(0., e02000 - e26270) + max(0., c01000))
    NIIT = NIIT_trt * min(NII, max(0., modAGI - NIIT_thd[MARS - 1]))
    return NIIT

The above code produces exactly the same results as the code on the master branch.

I have two questions about the above calculation of net investment income (NII):

(1) Why is it that e02000 - e26270, which is Schedule E income less partnership and S corporation net income, cannot be negative in the calculation of NII? Looking at Form 8960 and its instructions, I haven't found anything to indicate that a Schedule E loss cannot be used to offset other NII. Have I missed something in the thirty pages of instructions?

(2) Why is it that c01000, which capital gains limited to a loss of at most $3000 per Schedule D, cannot be negative in the calculation of NII? Looking at Form 8960 and its instructions, I haven't found anything to indicate that a combined short-term and long-term capital loss (as limited by Schedule D) cannot be used to offset other NII. Again, have I missed something?

@MattHJensen @feenberg @Amy-Xu @GoFroggyRun @zrisher @codykallen

@feenberg
Copy link
Contributor

On Wed, 24 Aug 2016, Martin Holmer wrote:

After reviewing the NIIT logic, I have some questions. In a development branch I'm
working on, the calculation of the NIIT is as follows:

def NetInvIncTax(e00300, e00600, e02000, e26270, c01000,
c00100, _feided, NIIT_thd, MARS, NIIT_trt, NIIT):
"""
NetInvIncTax function computes Net Investment Income Tax amount
(assume all annuity income is excluded from net investment income)
"""
modAGI = c00100 + _feided
NII = e00300 + e00600 + max(0., e02000 - e26270) + max(0., c01000)
NIIT = NIIT_trt * min(NII, max(0., modAGI - NIIT_thd[MARS - 1]))
return NIIT

The above code produces exactly the same results as the code on the master branch.

I have two questions about the above calculation of net investment income (NII):

(1) Why is it that e02000 - e26270, which is Schedule E income less partnership and S
corporation net income, cannot be negative in the calculation of NII? Looking at Form
8960 and its instructions, I haven't found anything to indicate that a Schedule E loss
cannot be used to offset other NII. Have I missed something in the thirty pages of
instructions?

In the sas calculator there is also a zero constraint on the Medicare tax
on unearned income.

c85190 = e00300+e00600+max(0,c01000)+max(0,e02000-e26270-e85180+e85070+e85080);

(2) Why is it that c01000, which capital gains limited to a loss of at most $3000 per
Schedule D, cannot be negative in the calculation of NII? Looking at Form 8960 and its
instructions, I haven't found anything to indicate that a combined short-term and
long-term capital loss (as limited by Schedule D) cannot be used to offset other NII.
Again, have I missed something?

This is same. The sas code is probably the source of this notion.

Because this part of the code has never been compared to actual returns,
it hasn't been tested, and is probably wrong.

dan

@MattHJensen @feenberg @Amy-Xu @GoFroggyRun @zrisher @codykallen


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the
thread.[AHvQVUVR3yDUECe83V-M5UbHVZUZXpy5ks5qjDcvgaJpZM4Jr8fF.gif]

@martinholmer
Copy link
Collaborator Author

Dan @feenberg said:

The sas code [taxcalc.sas] is probably the source of this notion.
Because this part of the code [that calculates NIIT] has never been compared to actual returns, it hasn't been tested, and is probably wrong.

There is some other evidence that is consistent with your notion that the current logic is wrong.
Here is how I'm considering changing the code:

NII = max(0., e00300 + e00600 + (e02000 - e26270) + c01000)

Does that make sense?

If this change is made, the validation tests against Internet TAXSIM will fail because Internet TAXSIM appears to have the same NIIT logic as in the taxcalc.sas program.

@MattHJensen @feenberg @Amy-Xu @GoFroggyRun @zrisher @codykallen

@GoFroggyRun
Copy link
Contributor

@martinholmer:

After looking at the instructions for Form 8960, I do not see anything to indicate that e02000 - e26270 or c01000 should be non-negative in NIIT's calculation as well.

And thus the follow code-line change

NII = max(0., e00300 + e00600 + (e02000 - e26270) + c01000)

makes sense to me.

@martinholmer
Copy link
Collaborator Author

Sean Wang (@GoFroggyRun), Thanks for your feedback on NIIT logic.

@martinholmer
Copy link
Collaborator Author

Issue #873 has been resolved by pull request #874.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants