-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
TAXSIM-35 Validation, "b" files #2705
Conversation
Payroll tax is good to pass, with details can be found in the payroll tax validation issue.
So payrolltax (FICA+SECA) validation should be considered to pass |
AGI c00100 validation: I have manually calculated the AGE c00100 variable in "b", "c" sets for all years. Tax-Calculator's result should be correct. Some detailed analysis: c00100 = ymod1 + c02500 - c02900 + taxable_ubi Under Taxsim's variable name: c02500, social security benefit in AGI, is calculated based on gssi variable from Taxsim. I have manually calculated this item following Social Security Benefits Worksheet -- line 20a and 20b, in 1040 instructions. The result of c02500 matches with Tax-Calculator's result taxable_ubi is Zero for all years in the validation sets, so there is no problem with this item c02900, total of all "above the line" income adjustments to get AGI: This variable is consisted of many items, as in form 1040 Sch 1 . However, the only variable which is not zero, in this validation, is Deductible part of self-employment tax e03260. And since e03260 = 0.5 * setax , we only need to conduct the validation of self-employment tax. So the c00100 AGI in Tax-Calculator should be correct. ~ difference of c00100 in Taxsim is likely come from the SECA tax calculation process (as mentioned before, Taxsim's payroll tax calculation is under the work of update) |
c11070 Child Tax Credit for 2021 validation: For year 2021, Child tax credit is categorized as nonrefundable child tax credit. So c11070 as the refunded Child tax credit is count as zero in Tax-Calculator. Taxsim35 calculates the amount of Child tax credit (it does not differentiate refundable vs nonrefundable credit) |
@bodiyang Thanks for reviewing the differences. Re Re Re the payroll taxes -- thanks for noting these known differences. Due to this, let's focus n getting the AGI/iitax difference to zero (or explaining any diffs) and not worry about payroll taxes. |
For c00100: I've already compared the intermediate variables, which are involved in c00100 calculation note: c11070 is involved in the iitax calculation, but not c00100 AGI calculation As documented in the previous comment: ymod1 = pwages + swages + psemp + ssemp + dividends + intrec + otherprop + nonprop + pensions + pui +sui + scorp + pbusinc + sbusinc + MAX(-3000, stcg + ltcg) other intermediate variables, c02500, c02900, taxable_ubi can be found at the details here |
amt_liability is correct in Tax-Calculator Taxsim zero out all of the amt_liability result, so should not be considered in the validation. |
Can you explain what you mean by "taxsim zero out all of the amt_liability
result"? Are you referring to a taxsim output variable? What name? I am on
vacation and will return to Cambridge on December 21, and can fix problems
then.
Dan
617-682-6204
…On Fri, 15 Dec 2023, Bodi Yang wrote:
**amt_liability** is correct in Tax-Calculator
Taxsim zero out all of the amt_liability result, so should not be considered in the validation.
I've conduct manual calculation (of different records from different years) following tax form 6251 and the manual calculation results all match with the Tax-Calculator's results.
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Taxsim's AMT calculation output ('27.AMT' in 'Federal tax calculation') is always zero, for all records which should have AMT. As an example: taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0 dep17 0 dep18 0 pwages 2000 swages psemp 147 ssemp dividends 17000 intrec 7000 stcg 7000 ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi 1000 pui 6000 sui 6000 transfers rentpaid proptax otheritem childcare mortgage scorp 350000 pbusinc 323000 pprofinc sbusinc sprofinc idtl This record should have $20401 AMT liability, but Taxsim is showing zero for the AMT output. Bodi |
non_refundable_child_odep_credit is correct in Tax-Calculator. The result of my manual calculation match with the Tax-Calculator's result. example record in c21:
So Tax-Calculator does slight off by the manual calculation, this is because of the $1,000 rounding rule mentioned in the issue above; I don't see the reason why Taxsim is off manual calculation is in IMG_5185.HEIC.zip The above is an example record. I have gone through records in both 'b' & 'c' set and Tax-Calculator should be correct. |
@jdebacker I'm including both 'b' and 'c' sets validation in this PR, because they are showing similar differences. |
I am concerned that apparently this taxpayer with mstat=1 has both pui
and sui non-zero.
Taxsim checks for that, so perhaps sui is intended to be zero? I'll
continue working under that assumption. It would help if sent all the
results for this taxpayer, and possibly your calculation.
Daniel Feenberg
617-682-6204
…On 12/18/23, Bodi Yang ***@***.***> wrote:
> Can you explain what you mean by "taxsim zero out all of the amt_liability
> result"? Are you referring to a taxsim output variable? What name? I am on
> vacation and will return to Cambridge on December 21, and can fix problems
> then. Dan 617-682-6204
> […](#)
> On Fri, 15 Dec 2023, Bodi Yang wrote: **amt_liability** is correct in
> Tax-Calculator Taxsim zero out all of the amt_liability result, so should
> not be considered in the validation. I've conduct manual calculation (of
> different records from different years) following tax form 6251 and the
> manual calculation results all match with the Tax-Calculator's results. --
> Reply to this email directly or view it on GitHub: [#2705
> (comment)](#2705 (comment))
> You are receiving this because you are subscribed to this thread. Message
> ID: ***@***.***>
Taxsim's AMT calculation output ('27.AMT' in 'Federal tax calculation') is
always zero, for all records which should have AMT.
As an example:
taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0 dep17
0 dep18 0 pwages 2000 swages psemp 147 ssemp dividends 17000 intrec
7000 stcg 7000 ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi
1000 pui 6000 sui
6000 transfers rentpaid proptax otheritem childcare mortgage scorp 350000
pbusinc 323000 pprofinc sbusinc sprofinc idtl
This record should have $20401 AMT liability, but Taxsim is showing zero for
the AMT output.
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
The result I got from taxsim of this record is: income tax $95709.64. payroll tax $27665.4. AGI $ 519936.6 My manual calculation can be found in the attached picture zip file in my previous comment Best, |
On Mon, 25 Dec 2023, Bodi Yang wrote:
My manual calculation can be found in [the attached picture zip file in
my previous
comment](#2705 (comment))
At that page I see highlighted a link to a for 8812 that is not relevant.
Daniel Feenberg
617-682-6204
…
Best,
Bodi
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Oh I see, we probably end up talking about different issues in this PR. Sorry about the confusion. So there are two issues so far ~
record: This record should have $20401 AMT liability, but Taxsim is showing zero for the AMT output. Taxsim output: income tax $ 213264.5. payroll tax: $27343.59. AGI: $762930.7
example record: The non_refundable_child_odep_credit should be $250, by my manual calculation following form 1040 schdule 8812. The result I got from taxsim of this record is: income tax $95709.64. payroll tax $27665.4. AGI $ 519936.6 |
I may send my manual calculation of the AMT issue later. I'm traveling and left my manual calculation draft in office. Will get back next week. |
I am trying to work on the AMT issue. If I select comment 2705 it goes to
a thread with a score of links. I can't find any that provide the manual
calculation of the AMT example. It doesn't do any good to keep referring
me to that thread, unless you believe I am missing a relevant link, and
can provide more information to me about which link is relevant. Or you
could just attach the manual calculation to the email.
Thank you
Daniel Feenberg
617-682-6204
…On Mon, 25 Dec 2023, Bodi Yang wrote:
> On Mon, 25 Dec 2023, Bodi Yang wrote: My manual calculation can be found in [the attached picture zip file in my previous comment]([#2705 (comment)](#2705 (comment)))
> At that page I see highlighted a link to a for 8812 that is not relevant. Daniel Feenberg 617-682-6204
> [?](#)
> Best, Bodi -- Reply to this email directly or view it on GitHub: [#2705 (comment)](#2705 (comment)) You are receiving this because you commented. Message ID: ***@***.***>
Oh I see, we probably end up talking about different issues in this PR. Sorry about the confusion. So there are two issues so far ~
1. I posted **the issue of AMT** [in this comment](#2705 (comment))
record:
taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0 dep17 0 dep18 0 pwages 2000 swages psemp 147 ssemp dividends 17000 intrec 7000 stcg 7000 ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi 1000 pui 6000 sui 6000 transfers rentpaid proptax otheritem childcare mortgage scorp 350000 pbusinc 323000 pprofinc sbusinc sprofinc idtl
This record should have $20401 AMT liability, but Taxsim is showing zero for the AMT output.
Taxsim output: income tax $ 213264.5. payroll tax: $27343.59. AGI: $762930.7
2. And **another issue of child tax credit** [ in another comment here](#2705 (comment))
example record:
taxsimid 222 year 2021 state mstat 2 page 75 sage 74 depx 3 dep13 3 dep17 3 dep18 3 pwages 14000 swages 20000 psemp 278 ssemp 281 dividends 18000 intrec 5000 stcg 0 ltcg -2000 otherprop 3000 nonprop 26000 pensions 16000 gssi 16000 pui 10000 sui 7000 transfers 0 rentpaid 0 proptax 6000 otheritem 10000 childcare 4000 mortgage 39000 scorp 165000 pbusinc 121000 pprofinc 0 sbusinc 114000 sprofinc
The non_refundable_child_odep_credit should be $250, by my manual calculation following form 1040 schdule 8812.
Tax-Calculator result is $274.14; Taxsim result is $3.17
The result I got from taxsim of this record is: income tax $95709.64. payroll tax $27665.4. AGI $ 519936.6
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Oh, I see, there isn't a manual calculation for the AMT yet. I missed
that. I'll put off working on this then.
Sorry
Daniel Feenberg
617-682-6204
…On Mon, 25 Dec 2023, Bodi Yang wrote:
>> On Mon, 25 Dec 2023, Bodi Yang wrote: My manual calculation can be found in [the attached picture zip file in my previous comment]([#2705 (comment)](#2705 (comment)))
>> At that page I see highlighted a link to a for 8812 that is not relevant. Daniel Feenberg 617-682-6204
>> [?](#)
>> Best, Bodi -- Reply to this email directly or view it on GitHub: [#2705 (comment)](#2705 (comment)) You are receiving this because you commented. Message ID: _**@**_.***>
>
> Oh I see, we probably end up talking about different issues in this PR. Sorry about the confusion. So there are two issues so far ~
>
> 1. I posted **the issue of AMT** [in this comment](#2705 (comment))
>
> record: taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0 dep17 0 dep18 0 pwages 2000 swages psemp 147 ssemp dividends 17000 intrec 7000 stcg 7000 ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi 1000 pui 6000 sui 6000 transfers rentpaid proptax otheritem childcare mortgage scorp 350000 pbusinc 323000 pprofinc sbusinc sprofinc idtl
>
> This record should have $20401 AMT liability, but Taxsim is showing zero for the AMT output.
>
> Taxsim output: income tax $ 213264.5. payroll tax: $27343.59. AGI: $762930.7
>
> 2. And **another issue of child tax credit** [ in another comment here](#2705 (comment))
>
> example record: taxsimid 222 year 2021 state mstat 2 page 75 sage 74 depx 3 dep13 3 dep17 3 dep18 3 pwages 14000 swages 20000 psemp 278 ssemp 281 dividends 18000 intrec 5000 stcg 0 ltcg -2000 otherprop 3000 nonprop 26000 pensions 16000 gssi 16000 pui 10000 sui 7000 transfers 0 rentpaid 0 proptax 6000 otheritem 10000 childcare 4000 mortgage 39000 scorp 165000 pbusinc 121000 pprofinc 0 sbusinc 114000 sprofinc
>
> The non_refundable_child_odep_credit should be $250, by my manual calculation following form 1040 schdule 8812. Tax-Calculator result is $274.14; Taxsim result is $3.17
>
> The result I got from taxsim of this record is: income tax $95709.64. payroll tax $27665.4. AGI $ 519936.6
I may send my manual calculation of the AMT issue later. I'm traveling and left my manual calculation draft in office. Will get back next week.
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Hi Daniel, I've attached the manual calculation of the AMT issue record in this file: AMT record.zip note: line 4 of the form, Alternative minimum taxable income $762940; and line 10 of the form, Form 1040 or 1040-SR line 16 ... $183930 are intermediate variables read from output of Tax-Calculator record input: This record should have $20401 AMT liability, but Taxsim is showing zero for the AMT output. Taxsim output: income tax $ 213264.5. payroll tax: $27343.59. AGI: $762930.7 |
Can you send the 1040, Qualified Dividens and Capital Gain Tax
worksheet and Schedule D itself also? I need to be able to put the
taxpayer into TaxAct and see what it calculates and I am having
trouble getting TaxAct to generate the numbers for line13, 20 and 27
of form 6251.
Thanks
Daniel Feenberg
+1 617-682-6204
…On 1/2/24, Bodi Yang ***@***.***> wrote:
> Oh, I see, there isn't a manual calculation for the AMT yet. I missed
> that. I'll put off working on this then. Sorry Daniel Feenberg
> 617-682-6204
> […](#)
> On Mon, 25 Dec 2023, Bodi Yang wrote: >> On Mon, 25 Dec 2023, Bodi Yang
> wrote: My manual calculation can be found in [the attached picture zip
> file in my previous comment]([#2705 (comment)]([#2705
> (comment)](#2705 (comment))))
> >> At that page I see highlighted a link to a for 8812 that is not
> relevant. Daniel Feenberg 617-682-6204 >> [?](#) >> Best, Bodi -- Reply to
> this email directly or view it on GitHub: [#2705 (comment)]([#2705
> (comment)](#2705 (comment)))
> You are receiving this because you commented. Message ID: _**@**_.***> > >
> Oh I see, we probably end up talking about different issues in this PR.
> Sorry about the confusion. So there are two issues so far ~ > > 1. I
> posted **the issue of AMT** [in this comment]([#2705
> (comment)](#2705 (comment)))
> > > record: taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0
> dep17 0 dep18 0 pwages 2000 swages psemp 147 ssemp dividends 17000 intrec
> 7000 stcg 7000 ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi
> 1000 pui 6000 sui 6000 transfers rentpaid proptax otheritem childcare
> mortgage scorp 350000 pbusinc 323000 pprofinc sbusinc sprofinc idtl > >
> This record should have $20401 AMT liability, but Taxsim is showing zero
> for the AMT output. > > Taxsim output: income tax $ 213264.5. payroll tax:
> $27343.59. AGI: $762930.7 > > 2. And **another issue of child tax credit**
> [ in another comment here]([#2705
> (comment)](#2705 (comment)))
> > > example record: taxsimid 222 year 2021 state mstat 2 page 75 sage 74
> depx 3 dep13 3 dep17 3 dep18 3 pwages 14000 swages 20000 psemp 278 ssemp
> 281 dividends 18000 intrec 5000 stcg 0 ltcg -2000 otherprop 3000 nonprop
> 26000 pensions 16000 gssi 16000 pui 10000 sui 7000 transfers 0 rentpaid 0
> proptax 6000 otheritem 10000 childcare 4000 mortgage 39000 scorp 165000
> pbusinc 121000 pprofinc 0 sbusinc 114000 sprofinc > > The
> non_refundable_child_odep_credit should be $250, by my manual calculation
> following form 1040 schdule 8812. Tax-Calculator result is $274.14; Taxsim
> result is $3.17 > > The result I got from taxsim of this record is: income
> tax $95709.64. payroll tax $27665.4. AGI $ 519936.6 I may send my manual
> calculation of the AMT issue later. I'm traveling and left my manual
> calculation draft in office. Will get back next week. -- Reply to this
> email directly or view it on GitHub: [#2705
> (comment)](#2705 (comment))
> You are receiving this because you commented. Message ID: ***@***.***>
Hi Daniel, I've attached the manual calculation of the AMT issue record in
this file: [AMT
record.zip](https://github.com/PSLmodels/Tax-Calculator/files/13811646/AMT.record.zip)
The manual calculation follows form 6251 of the year 2021
**note**: line 4 of the form, Alternative minimum taxable income $762940;
and line 10 of the form, Form 1040 or 1040-SR line 16 ... $183930 are
intermediate variables read from output of **Tax-Calculator**
(These two intermediate variables' result from **Taxsim** are: AMT taxable
income $700942; line 16 of form 1040 is $214387)
record input:
taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0 dep17 0 dep18 0
pwages 2000 swages psemp 147 ssemp dividends 17000 intrec 7000 stcg 7000
ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi 1000 pui 6000
sui 6000 transfers rentpaid proptax otheritem childcare mortgage scorp
350000 pbusinc 323000 pprofinc sbusinc sprofinc idtl
**This record should have $20401 AMT liability, but Taxsim is showing zero
for the AMT output.**
Taxsim output: income tax $ 213264.5. payroll tax: $27343.59. AGI:
$762930.7
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
I've attached the Qualified Dividends and Capital Gain Tax Worksheet and form 1040 Sch D ~ I only completed the lines which is related When filling Form 6251 Note: line 1 of the Qualified Dividends and Capital Gain Tax Worksheet is the taxable income Form 1040 line 15, which is read from the Tax-Calculator output $607811 (taxable income from Taxsim35 is $680442) |
1) Maybe I am not entering the data correctly. Attached is taxsim output
showing AGI of 762,817, which is suspiciously close to your 762,940 for
taxable income on the 6251. But I see a QBI deduction of 134,600, which
means taxable income should be much less and significantly lowers the
AMT.
2) Are you using the latest version of taxsim? Online it is at
http://taxsim.nber.org/taxsimtest
and I have attached fortran source code. Actually, I can see you are using
taxsim35, while I am trying to get taxsimtest ready to make the production
version. It is really important that you test against the new version.
3) I am still concerned that the numbers you gave me can not be the
numbers used by taxsim, since you specified mstat==1 and then have spouse
UI. I don't understand why you are so reluctant to show me your work. It
would clarify things if I had the 1040, or at least the data from that
page. Can your software print out an observation? That might be enough.
4) Something about your mail client
Daniel Feenberg
+1 617-682-6204
On Fri, 5 Jan 2024, Bodi Yang wrote:
> Can you send the 1040, Qualified Dividens and Capital Gain Tax worksheet and Schedule D itself also? I need to be able to put the taxpayer into TaxAct and see what it calculates and I am having trouble getting TaxAct to generate the numbers for line13, 20 and 27 of form 6251. Thanks Daniel Feenberg +1 617-682-6204
> [?](#)
> On 1/2/24, Bodi Yang ***@***.***> wrote: > Oh, I see, there isn't a manual calculation for the AMT yet. I missed > that. I'll put off working on this then. Sorry Daniel Feenberg > 617-682-6204 > [?](#) > On Mon, 25 Dec 2023, Bodi Yang wrote: >> On Mon, 25 Dec 2023, Bodi Yang > wrote: My manual calculation can be found in [the attached picture zip > file in my previous comment]([#2705 (comment)]([#2705 > (comment)]([#2705 (comment)](#2705 (comment))))) > >> At that page I see highlighted a link to a for 8812 that is not > relevant. Daniel Feenberg 617-682-6204 >> [?](#) >> Best, Bodi -- Reply to > this email directly or view it on GitHub: [#2705 (comment)]([#2705 > (comment)]([#2705 (comment)](#2705 (comment)))) > You are receiving this because you commented. Message ID: _**@**_.***> > > > Oh I see, we probably end up talking about different issues in!
this PR. > Sorry about the confusion. So there are two issues so far ~ > > 1. I > posted **the issue of AMT** [in this comment]([#2705 > (comment)]([#2705 (comment)](#2705 (comment)))) > > > record: taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0 > dep17 0 dep18 0 pwages 2000 swages psemp 147 ssemp dividends 17000 intrec > 7000 stcg 7000 ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi > 1000 pui 6000 sui 6000 transfers rentpaid proptax otheritem childcare > mortgage scorp 350000 pbusinc 323000 pprofinc sbusinc sprofinc idtl > > > This record should have $20401 AMT liability, but Taxsim is showing zero > for the AMT output. > > Taxsim output: income tax $ 213264.5. payroll tax: > $27343.59. AGI: $762930.7 > > 2. And **another issue of child tax credit** > [ in another comment here]([#2705 > (comment)]([#2705 (comment)](#2705 (comment)!
3374945))) > > > example record: taxsimid 222 year 2021 state mstat 2 page 75 sage 74 > depx 3 dep13 3 dep17 3 dep18 3 pwages 14000 swages 20000 psemp 278 ssemp > 281 dividends 18000 intrec 5000 stcg 0 ltcg -2000 otherprop 3000 nonprop > 26000 pensions 16000 gssi 16000 pui 10000 sui 7000 transfers 0 rentpaid 0 > proptax 6000 otheritem 10000 childcare 4000 mortgage 39000 scorp 165000 > pbusinc 121000 pprofinc 0 sbusinc 114000 sprofinc > > The > non_refundable_child_odep_credit should be $250, by my manual calculation > following form 1040 schdule 8812. Tax-Calculator result is $274.14; Taxsim > result is $3.17 > > The result I got from taxsim of this record is: income > tax $95709.64. payroll tax $27665.4. AGI $ 519936.6 I may send my manual > calculation of the AMT issue later. I'm traveling and left my manual > calculation draft in office. Will get back next week. -- Reply to this > email directly or view it on GitHub: [#2705 > (comment)]([#2705 (comment)](#2705 (comment))) > You a!
re receiving this because you commented. Message ID: ***@***.***> Hi Daniel, I've attached the manual calculation of the AMT issue record in this file: [AMT record.zip](https://github.com/PSLmodels/Tax-Calculator/files/13811646/AMT.record.zip) The manual calculation follows form 6251 of the year 2021 **note**: line 4 of the form, Alternative minimum taxable income $762940; and line 10 of the form, Form 1040 or 1040-SR line 16 ... $183930 are intermediate variables read from output of **Tax-Calculator** (These two intermediate variables' result from **Taxsim** are: AMT taxable income $700942; line 16 of form 1040 is $214387) record input: taxsimid year 2021 state mstat 1 page 77 sage depx 5 dep13 0 dep17 0 dep18 0 pwages 2000 swages psemp 147 ssemp dividends 17000 intrec 7000 stcg 7000 ltcg 1000 otherprop 19000 nonprop 13000 pensions 24000 gssi 1000 pui 6000 sui 6000 transfers rentpaid proptax otheritem childcare mortgage scorp 350000 pbusinc 323000 pprofinc sbusinc sprofinc!
idtl **This record should have $20401 AMT liability, but Taxsim is showing zero for the AMT output.** Taxsim output: income tax $ 213264.5. payroll tax: $27343.59. AGI: $762930.7 -- Reply to this email directly or view it on GitHub: [#2705 (comment)](#2705 (comment)) You are receiving this because you commented. Message ID: ***@***.***>
I've attached [the Qualified Dividends and Capital Gain Tax Worksheet and form 1040 Sch D](https://github.com/PSLmodels/Tax-Calculator/files/13844365/SchD.Qualid.dividends.Cap.tax.zip) ~ I only completed the lines which is related
When filling Form 6251
line 13 of Form 6251 = line 4 of Qualified Dividends and Capital Gain Tax Worksheet = 18000
line 20 of Form 6251 = line 5 of Qualified Dividends and Capital Gain Tax Worksheet = 589811
line 27 of Form 6251 = line 5 of Qualified Dividends and Capital Gain Tax Worksheet = 589811
Note: line 1 of the Qualified Dividends and Capital Gain Tax Worksheet is the taxable income Form 1040 line 15, which is read from the Tax-Calculator output $607811 (taxable income from Taxsim35 is $680442)
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
NBER TAXSIM (Compiled 20240104) With TCJA
State law coded through 2022
Later state laws extrapolated from that year.
Marginal tax rate wrt taxpayer earnings.
Input Data:
1. Record ID: 1.
2. Tax Year: 2021.00
State not specified
4. Marital Status: 1.00 HoH
5-6. Age (Txpyr/Spouse): 77.00 0.00
7. Dependent Exemptions: 5.00
Dependent Ages 0.00 0.00 0.00
8-10. #deps for CCC/CTC/EIC: 5.00 5.00 5.00
11-12. Wages (Txpyr/Spouse): 2000.00 0.00
11a12a Self-employment income: 147.00 0.00
13. Dividend Income: 17000.00
14. Interest Received: 7000.00
15. Short Term Gains: 7000.00
16. Long Term Gains: 1000.00
17. Other Property: 19000.00
18. Other Non-Property: 13000.00
19. Taxable Pensions: 24000.00
20. Gross Social Security: 1000.00
21. Tot/Txpy/Spouse UI : 0.00 6000.00 6000.00
22. Non-taxable Transfers: 0.00
23. Rent Paid: 0.00
24. Property Taxes Paid: 0.00
25. Other Itemized Deds: 0.00
26. Child Care Expenses: 0.00
27. Mortgage Interest: 0.00
28. S-Corp profits: 350000.00
29 31. Txpy/Spouse QBI w/o PO: 323000.00 0.00
30 32. Txpy/Spouse SSTB w PO: 0.00 0.00
Basic Output:
1. Record ID: 1.
2. Year: 2021
State not specified
4. Federal IIT Liability: 186356.00
5. State IIT Liability: 0.00
6. SS Payroll Tax Liability: 26543.56
Marginal Rates wrt Earner
7. Federal Marginal Rate: 37.00
8. State Marginal Rate: 0.00
9. Taxpayer SS Rate: 0.00
Federal Tax Calculation: Base +$1
10. Federal AGI 762816.22 762817.22
11. UI in AGI 1979+ 12000.00 12000.00
12. Social Security in AGI 84 850.00 850.00
13. Zero Bracket Amount 20500.00 20500.00
14. Personal Exemptions 0.00 0.00
15. Exemption Phaseout 1991+ 0.00 0.00
16. Deduction Phaseout 1991+ 0.00 0.00
17. Deductions allowed 0.00 0.00
QBI deduction 134600.00 134600.00
18. Federal Taxable Income 607716.22 607717.22
19. Federal Regular Tax 187478.00 187478.37
20. Exemption Surtax 1988-96 0.00 0.00
21. General Tax Credit 1975-8 0.00 0.00
22. Child Tax Credit 0.00 0.00
Additional CTC 0.00 0.00
23 Refundable Part 0.00 0.00
24. Child Care Credit 1076+ 0.00 0.00
25. Earned Income Credit 1975 0.00 0.00
26. Alternative Min Income: 628216.22 628217.22
27. AMT 0.00 0.00
28. Income Tax Before Credits 184418.00 184418.37
Total Credits 0.00 0.00
29. FICA 26543.56 26543.65
Taxpayer share of FICA 26390.56 26390.58
TCJA 2018+
42. QBI Deduction 134600.00 134600.00
Additional Medicare Taxes 2013+
43. Net Investment Income Tax 1938.00 1938.00
44. Medicare Tax on Earnings 1126.32 1126.33
Decomposition of Federal Marginal Rate
(taxpayer earned income)
Regular Income Tax
Bracket rate from X,Y or Z 42.00
Deduction Phaseout: 0.00
Exemption Phaseout: 0.00
Social Security Phasein: 0.00
Child Tax Credit: 0.00
Child Care Credit: 0.00
Refundable Part of CTC: 0.00
Earned Income Credit: 0.00
Surtax on 15% bracket: 0.00
Exemption Surtax: 0.00
Unemployment Insurance: 0.00
Max Tax on Earned Income: 18000.00
Elderly Credit: 0.00
Dependent Care Credit: 0.00
Percentage Std Deduction: 0.00
Medicare tax on Unearned Inco 0.00
Cares Recovery Rebates: 0.00
Alternative Minimum Income Tax
AMT Bracket Rate 28.00
AMT Phaseout -28.00
Only Regular Tax Relevant
Total Marginal Rate: 42.00
FICA w Medicare (t,s): 0.00 0.00
c This is the fixed format Fortran-90 source code for TAXSIM
c as compiled 20240105. It is copyright 2023 by NBER and
c Daniel Feenberg. Please do not pass along to other users.
c Refer potential users to ***@***.*** for their own
c copy.
c Documentation is at http://taxsim.nber.org
c Bug reports and suggestions for improvement are always welcome.
c Thank you
c Daniel Feenberg
c +1 617-617-682-6204
c ***@***.***
block data mrhb
common/mrhc/mrh
data mrh/1/
end
double precision function rup(a,h)
c a=value to round up to a multiple of h and non-negative
implicit double precision (a-h,o-z)
common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders,
&gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100)
extnd(88)=1.d0
if(extnd(88).eq.0.d0) then
rup=max(a,0.d0)
else
rup=max(0.d0,ceiling(a/h)*h)
endif
return
end
double precision function sern(d)
implicit double precision(a-h,o-z)
dimension d(255)
if(d(2).eq.2.and.d(85)+d(86).gt.0.d0) then
sern=min(d(85),d(86))
else
sern=d(11)
endif
return
end
integer function itwn(i,imin,imax)
itwn=min(imax,max(i,imin))
return
end
subroutine statax(data,lawyr,comnew)
implicit double precision (A-H,O-Z)
parameter(lastat=2022)
common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders,
&gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100)
common/calc/hy,rent,agi,exemp,stded,xitded,taxinc,pcred,chcr,
& earncr,credit,rt,taxbc,rebate,energy,ctc,ylow,amt
common /xndxac/ xndxa(1981:2023)
dimension data(255),comnew(255)
dimension ds(255),coms(255)
c DO NOT FORGET TO UPDATE parameter(lastat) EVERY YEAR
agi=0.
exemp =0.
stded =0.
xitded=0.
taxinc=0.
pcred =0.
chcr =0.
earncr=0.
credit=0.
rt =0.
taxbc =0.
rebate=0.
energy=0.
ctc =0.
ylow =0.
amt =0.
stax=0.
rt=0.
hy=data(159)
rent=data(160)
comnew(74)=0.
id=int(abs(data(6)))
if(lawyr.eq.-99) then
lawyr=lastat
return
endif
if(lawyr.lt.1977) then
write(*,*)
& 'TAXSIM: State Tax Calculator available for years 1977+'
return
endif
if(id.le.0.or.id.gt.51) return
flate = 1.
law = lawyr
if(extnd(21).gt.0) law = int(extnd(21))
if(law.gt.lastat) then
flate = xndxa(law)/xndxa(lastat)
law = lastat
endif
do 100 i=1,255
ds(i) = data(i)
coms(i) = comnew(i)
100 continue
do 200 i=11,99
ds(i) = data(i)/flate
ds(i+100) = data(i+100)/flate
200 continue
do 300 i=1,98
if(i.ne.26.and.i.ne.65.and.i.ne.72.and.i.ne.73)
& coms(i) = comnew(i)/flate
300 continue
i=int(data(6))
select case(i)
case(1)
call altax(ds,coms,stax,law)
case(2)
call aktax(ds,coms,stax,law)
case(3)
call aztax(ds,coms,stax,law)
case(4)
call artax(ds,coms,stax,law)
case(5)
call catax(ds,coms,stax,law)
case(6)
call cotax(ds,coms,stax,law)
case(7)
call cttax(ds,coms,stax,law)
case(8)
call detax(ds,coms,stax,law)
case(9)
call dctax(ds,coms,stax,law)
case(11)
call gatax(ds,coms,stax,law)
case(12)
call hitax(ds,coms,stax,law)
case(13)
call idtax(ds,coms,stax,law)
case(14)
call iltax(ds,coms,stax,law)
case(15)
call intax(ds,coms,stax,law)
case(16)
call iatax(ds,coms,stax,law)
case(17)
call kstax(ds,coms,stax,law)
case(18)
call kytax(ds,coms,stax,law)
case(19)
call latax(ds,coms,stax,law)
case(20)
call metax(ds,coms,stax,law)
case(21)
call mdtax(ds,coms,stax,law)
case(22)
call matax(ds,coms,stax,law)
case(23)
call mitax(ds,coms,stax,law)
case(24)
call mntax(ds,coms,stax,law)
case(25)
call mstax(ds,coms,stax,law)
case(26)
call motax(ds,coms,stax,law)
case(27)
call mttax(ds,coms,stax,law)
case(28)
call netax(ds,coms,stax,law)
case(30)
call nhtax(ds,coms,stax,law)
case(31)
call njtax(ds,coms,stax,law)
case(32)
call nmtax(ds,coms,stax,law)
case(33)
call nytax(ds,coms,stax,law)
case(34)
call nctax(ds,coms,stax,law)
case(35)
call ndtax(ds,coms,stax,law)
case(36)
call ohtax(ds,coms,stax,law)
case(37)
call oktax(ds,coms,stax,law)
case(38)
call ortax(ds,coms,stax,law)
case(39)
call patax(ds,coms,stax,law)
case(40)
call ritax(ds,coms,stax,law)
case(41)
call sctax(ds,coms,stax,law)
case(43)
call tntax(ds,coms,stax,law)
case(45)
call uttax(ds,coms,stax,law)
case(46)
call vttax(ds,coms,stax,law)
case(47)
call vatax(ds,coms,stax,law)
case(49)
call wvtax(ds,coms,stax,law)
case(50)
call witax(ds,coms,stax,law)
case default
stax=0.d0
end select
comnew(74) = stax*flate
return
end
c
c Subroutines from Statutil
c
recursive double precision function socsec(data,comnew,law)
implicit double precision (A-H,O-Z)
dimension data(255),comnew(255),rate(1977:2025),ceil(1977:2029)
data rate
* / .0585d0,.0605d0,.0613d0,.0613d0,
* .0665d0,.0670d0,.0670d0,.0700d0,.0705d0,
* .0715d0,.0715d0,.0751d0,.0751d0,21*.0765d0,
* 2*.0565d0,13*.0765d0/
data ceil
* / 16500.d0, 17700.d0, 22900.d0, 25900.d0,
* 29700.d0, 32400.d0, 35700.d0, 37800.d0, 39600.d0,
* 42000.d0, 43800.d0, 45000.d0, 48000.d0, 51300.d0,
* 53400.d0, 55500.d0, 57600.d0, 60600.d0, 61200.d0,
* 62700.d0, 65400.d0, 68400.d0, 72600.d0, 76200.d0,
* 80400.d0, 84900.d0, 87000.d0, 87900.d0, 90000.d0,
* 94200.d0, 97500.d0,102000.d0,106800.d0,106800.d0,
* 106800.d0,110100.d0,113700.d0,117000.d0,118500.d0,
* 118500.d0,127200.d0,128700.d0,132900.d0,137700.d0,
* 142800.d0,147000.d0,153600.d0,159300.d0,165300.d0,
* 171300.d0,177300.d0,183600.d0,190200.d0/
c actual amounts through 2022 (03.21.2022)
mst = int(data(2))
if(mst.eq.2) then
fica = (min(data(85),ceil(law))+min(data(86),ceil(law)))*
& rate(law)
if(data(85).gt.ceil(law))
& fica = fica + (data(85)-ceil(law))*.0145
if(data(86).gt.ceil(law))
& fica = fica + (data(86)-ceil(law))*.0145
else
fica = min(data(11),ceil(law))*rate(law)
if(data(11).gt.ceil(law))
& fica = fica + (data(11)-ceil(law))*.0145
endif
c socsec = fica + data(43)+data(44)
c c175 = setax in sstax
socsec = fica + comnew(175)+data(44)
c Additional 0.9% Medicare Tax on Earned Income
if(law.ge.2013) socsec = socsec + comnew(180)
return
end
double precision function xjobs(data,law)
implicit double precision (A-H,O-Z)
dimension data(255),rate1(1977:1994),rate2(1977:1994)
data rate1/10*.5d0,3*.4d0,5*0.0d0/
data rate2/10*.25d0,8*0.0d0/
amt1=0.
amt2=0.
xjobs=0.
if(law.le.1986) then
amt1=data(37)*2/3
amt2=amt1/2
xjobs=min(12000.0d0,(amt1/rate1(law))+(amt2/rate2(law)))
elseif(law.ge.1987.and.law.le.1989) then
amt1=data(37)
amt2=0.
xjobs=min(6000.0d0,(amt1/rate1(law)))
elseif(law.ge.1990) then
xjobs=0.
endif
return
end
c
recursivesubroutine look(table,y,ntab,n,statax,aif,data2,rt,data)
implicit double precision (A-H,O-Z)
common/times/z,p,txrate,h
dimension table(2,ntab),data(255)
integer d2,d209
d209 = int(data(209))
d2 = int(data2)
c negative data2 is signal that separate filing is allowed.
h=0.
c ntab=25
call look2(table,y,ntab,n,statax,aif,dabs(data2),rt,data)
if(d2.eq.-2) then
yh= max(data(85),data(86))+(y-data(11))/2.
yw=y-yh
h=2
call look2(table,yw,ntab,n,taxw,aif,1.0d0,rt,data)
h=1
call look2(table,yh,ntab,n,taxh,aif,1.0d0,rt,data)
if(taxw+taxh.gt.statax.and.d209.eq.2) then
continue
endif
statax=min(statax,taxw+taxh)
endif
return
end
subroutine look2(table,y,ntab,n,statax,aif,data2,rt,data)
implicit double precision (A-H,O-Z)
c aif=annual inflation factor if indexed,otherwise 1.
common/times/z,p,txrate,h
c data2=marital status if joint filing is allowed,otherwise 0.
dimension table(2,ntab),data(255)
integer d2
d2 = int(data2)
c This line is in here to avoid unused variable errors
n = n
ajnt=1.
if(d2.eq.2.or.d2.eq.5)ajnt=2
y1=max(y/aif/ajnt,0.0d0)
statax=0.
rt=0.
yleft=y1
rate=table(2,1)/100.
if(y1.lt.table(1,1)) goto 99
statax=table(1,1)*table(2,1)/100.
do 10 i=2,ntab
if(table(1,i).lt.table(1,i-1).or.table(2,i).lt..1) then
if(table(2,i).gt.0) then
d101 = data(101)
d100 = data(100)
c write(*,*) 'TAXSIM:in look2',
c & table(1,i),table(1,i-1),table(2,i),d101,data(6),d100
endif
endif
yleft=y1-table(1,i-1)
rate=table(2,i)/100.
if(y1.lt.table(1,i)) goto 99
statax=statax+(table(1,i)-table(1,i-1))*rate
10 continue
yleft=y1-table(1,ntab)
99 continue
statax=aif*ajnt*(yleft*rate+statax)
c calculating marginal tax rate
rt=rate
return
end
subroutine badlook2(table,y,ntab,n,statax,aif,data2,rt,data)
implicit double precision (A-H,O-Z)
c aif=annual inflation factor if indexed,otherwise 1.
common/times/z,p,txrate,h
common/xcom/x(48)
c data2=marital status if income splitting is allowed,otherwise 0.
dimension table(2,ntab),data(255)
integer d2
d2 = int(data2)
c This line is in here to avoid unused variable errors
n = n
ajnt=1.
if(d2.eq.2.or.d2.eq.5)ajnt=2
y1=max(y/aif/ajnt,0.0d0)
if(x(3).gt.0.and.x(1).lt.-2)
& write(*,*)'y,aif,y1',int(y),sngl(aif),int(y1),int(ajnt)
statax=0.
rt=0.
yleft=y1
rate=table(2,1)/100.
if(y1.lt.table(1,1)) goto 99
statax=table(1,1)*table(2,1)/100.
do 10 i=2,ntab
if(table(1,i).lt.table(1,i-1).or.table(2,i).lt..1) then
if(table(2,i).gt.0) then
d101 = data(101)
d100 = data(100)
write(*,*) 'TAXSIM: in look2',
& table(1,i),table(1,i-1),table(2,i),d101,data(6),d100
endif
endif
yleft=y1-table(1,i-1)
rate=table(2,i)/100.
if(y1.lt.table(1,i)) goto 99
statax=statax+(table(1,i)-table(1,i-1))*rate
incr=int((table(1,i)-table(1,i-1))*rate)
if(x(3).gt.0..and.x(1).lt.-1)
& write(*,*)'i rs',int(table(1,i)),'-',
& int(table(1,i-1)),'*'
& ,rate,incr,int(statax)
10 continue
yleft=y1-table(1,ntab)
if(data(6).ne.28) then
write(*,*)'TAXSIM: never here'
write(*,*) n,ntab,aif,table
call backtrace()
stop 10
endif
99 continue
if(x(3).gt.0.and.x(1).lt.-1)
& write(*,*)'rs ',yleft,'*',rate,'= ',yleft*rate
& ,'already',table(1,ntab)
statax=aif*ajnt*(yleft*rate+statax)
if(x(3).gt.0.and.x(1).lt.-1) then
write(*,*)'sum',int(statax)
endif
c calculating marginal tax rate
rt=rate
return
end
subroutine tplus(table,y,ntab,n,statax,aif,data2,rt,data)
implicit double precision (A-H,O-Z)
c aif=annual inflation factor if indexed,otherwise 1.
common/times/z,p,txrate,h
common/x/ct
c data2=marital status if income splitting is allowed,otherwise 0.
dimension table(3,ntab),data(255)
integer d2
c These lines are in here to avoid unused variable errors
d2 = int(data2)
dummy=data(1)
n = n
ii=1
ajnt=1.
if(d2.eq.2.or.d2.eq.5)ajnt=2
y1=max(y/aif/ajnt,0.0d0)
statax=0.
rt=0.
if(y1.lt.table(1,1)) then
statax=aif*ajnt*table(2,1)*y1/100.d0
else
do 10 i=2,ntab
ii=i
if(y1.lt.table(1,i)) exit
10 continue
yleft=y1-table(1,ii-1)
statax=table(3,ii)
statax=statax+table(2,ii)*yleft/100.d0
statax=aif*ajnt*statax
endif
c calculating marginal tax rate
rate=table(2,ii)/100.d0
rt=rate
c2 format(a8,3f8.2,f6.0,f4.0,f12.0)
return
end
double precision function disap(y,alow,ahigh)
implicit double precision (A-H,O-Z)
if(ahigh.le.alow) then
write(*,*) 'TAXSIM:never,in disap',alow,ahigh
continue
endif
disap=1.-min(max(((y-alow)/ahigh-alow),0.0d0),1.0d0)
return
end
double precision function xif(logic,real)
implicit double precision (A-H,O-Z)
logical logic
xif=0.
if(logic) xif=real
return
end
double precision function tablk(table,n,y,data)
implicit double precision (A-H,O-Z)
dimension table(2,n),data(255)
do 200 j=1,n
num=j
if(j+1.ge.n) goto 2
if(table(1,j+1).le.table(1,j)) then
write(*,*)'TAXSIM: tablk',table(1,j),table(1,j+1)
write(*,*)'law,state',int(data(6)),int(data(101)),
& int(data(100))
write(*,*)'table',(table(2,k),k=1,n)
call backtrace()
stop 100
endif
2 if(y.lt.table(1,j)) go to 210
200 continue
tablk=0.
210 tablk=table(2,num)
return
end
double precision function tablki(table,n,y,data)
implicit double precision (A-H,O-Z)
common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders,
&gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100)
dimension table(2,n),data(255)
do 200 j=1,n
num=j
if(j+1.ge.n) goto 2
if(table(1,j+1).le.table(1,j)) then
write(*,*) 'TAXSIM: in tablki',
& table(1,j),table(1,j+1),data(6)
call abort()
endif
2 if(y.lt.table(1,j)) go to 210
200 continue
w=-1.d0
210 continue
if(num.eq.1) then
tablki = table(2,num)
else if(num.lt.n) then
w = (y-table(1,num-1))/(table(1,num)-table(1,num-1))
if(table(2,num).gt.table(2,num-1)) then
tablki = w*table(2,num-1) + (1-w)*table(2,num)
else
tablki = w*table(2,num) + (1-w)*table(2,num-1)
endif
else if(num.eq.n) then
tablki=table(2,num)
endif
if(extnd(88).gt.0.d0) tablki = table(2,num)
return
end
double precision function tablk2(table,n,y,data)
implicit double precision (A-H,O-Z)
common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders,
&gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100)
dimension table(2,n),data(255)
do 200 j=1,n
num=j
if(j+1.ge.n) goto 2
if(table(1,j+1).le.table(1,j)) then
write(*,*) 'TAXSIM: in tablki',
& table(1,j),table(1,j+1),data(6)
endif
2 if(y.lt.table(1,j)) go to 210
200 continue
210 if(num.eq.1) then
tablk2 = table(2,num)
else if(num.lt.n) then
w = (y-table(1,num-1))/(table(1,num)-table(1,num-1))
if(table(2,num).gt.table(2,num-1)) then
tablk2 = w*table(2,num-1) + (1-w)*table(2,num)
else
tablk2 = w*table(2,num) + (1-w)*table(2,num-1)
endif
else if(num.eq.n) then
tablk2=table(2,num)
endif
if(extnd(88).gt.0.d0) tablk2 = table(2,max(1,num-1))
return
end
double precision function tablk3(table,n,y,data)
implicit double precision (A-H,O-Z)
common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders,
&gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100)
dimension table(2,n),data(255)
do 200 j=1,n
num=j
if(j+1.ge.n) goto 2
if(table(1,j+1).le.table(1,j)) then
write(*,*) 'TAXSIM: in tablk3',
& table(1,j),table(1,j+1),data(6)
endif
2 if(y.lt.table(1,j)) go to 210
200 continue
210 if(num.eq.1) then
tablk3 = table(2,num)
else if(num.lt.n) then
w = (y-table(1,num-1))/(table(1,num)-table(1,num-1))
if(table(2,num).gt.table(2,num-1)) then
tablk3 = w*table(2,num-1) + (1-w)*table(2,num)
else
tablk3 = w*table(2,num) + (1-w)*table(2,num-1)
endif
else if(num.eq.n) then
tablk3=table(2,num)
endif
if(extnd(88).gt.0.d0) tablk3 = table(2,max(1,num))
return
end
function lastk()
implicit double precision (A-H,O-Z)
lastk=13
return
end
double precision function sorm(mart,a,b)
implicit double precision (A-H,O-Z)
c this soubroutine determines married or single status
sorm=a
if(mart.eq.2.or.mart.eq.3.or.mart.eq.6)sORM=b
return
end
block data inpc87
implicit double precision (A-H,O-Z)
common/pce96/gnpd(1973:1999)
data gnpd
* / 34.02d0,36.96d0, 40.37d0, 42.79d0, 45.59d0, 48.75d0,
* 52.70d0,57.38d0,62.70d0, 66.51d0, 69.24d0, 71.80d0, 74.05d0,
* 75.66d0,77.84d0,80.46d0, 83.56d0, 86.83d0, 89.76d0, 91.70d0,
* 94.16d0,96.14d0,98.19d0,100.00d0,101.66d0,102.86d0,104.37d0/
end
c
double precision function keoles(data,comnew,lawyr)
implicit double precision (A-H,O-Z)
c adjusts keogh deductions to requested year levels
dimension data(255),comnew(255)
double precision keogh, kghmax,kghlim
kghmax = 7500.
if (lawyr.eq.1982.or.lawyr.eq.1983) kghmax = 15000.
if (lawyr.ge.1984) kghmax = 30000.
bus = data(17)+data(75)+data(79)-data(80)
retlim = max(0.0d0,.15*bus)
kghlim = min(retlim,kghmax)
keogh = min(data(28),kghlim)
keoles=max(0.0d0,comnew(14)-keogh)
return
end
c
double precision function irales(data,comnew,lawyr)
implicit double precision (A-H,O-Z)
c adjusts ira deductions tp requested year levels
dimension data(255),comnew(255)
double precision iramax, iralim, ira
integer sep
mst = int(data(2))
sep = 1
if(mst.eq.3.or.mst.eq.6) sep = 2
iramax = 3000.d0/sep
if (lawyr.ge.1981) iramax = 4000.d0/sep
if(mst.eq.1.or.mst.eq.4.or.mst.eq.7)iramax = iramax/2.
bus = data(17)+data(75)+data(79)-data(80)
busnet = max(0.0d0,bus-comnew(14))
iralim = min(data(11)+busnet,iramax)
ira = min(data(29),iralim)
irales=max(0.0d0,comnew(12)-ira)
return
end
c
double precision function divexc(data,comnew,law)
implicit double precision (A-H,O-Z)
c computes the amount of the federal div (int) excl
dimension data(255), comnew(255)
divexc=0.
diff=0.
if(law.ne.1981) diff= data(12) - comnew(4)
if(law.eq.1981) diff= data(12) + data(14) - comnew(4)
c3 format(' error in divexc, year:',i5,'divs:',f8.0,'int:',f8.0,
c + 'divs net of exc (from fed prg):',f8.0)
divexc=diff
return
end
c
double precision function disab(data,comnew,law)
implicit double precision (A-H,O-Z)
c computes amount of federal disability exclusion
dimension data(255),comnew(255)
disab=0.
if(law.ge.1981.and.law.le.1985) then
disab=data(25)
else
disab=max(0.0d0,data(25)-comnew(16))
endif
return
end
c
c
double precision function renter(data,comnew)
implicit double precision (A-H,O-Z)
c determines whether a return with no property tax is likely to
c pay rent
common/calc/hy,rent,agi,exemp,stded,xitded,taxinc,pcred,chcr,
& earncr,credit,rt,taxbc,rebate,energy,ctc,ylow,amt
dimension data(255), comnew(255)
renter=0.
c agi=max(0.0d0,comnew(2))
y=data(11)+data(23)
y=y+comnew(84)
if(data(51).lt.1.and.data(160).gt.0.) renter=1.
return
end
subroutine altax(data,comnew,statax,law)
parameter(last=2022,las=1)
implicit double precision (a-h,o-z)
integer sep,m2i(7)
dimension tab(2,4),tab82(2,3),xmp(2007:2022,2)
dimension std77(1977:2006,2),std07(2007:2022,4,3)
dimension data(255),comnew(255)
common/calc/hy,rent,agi,exemp,stded,xitded,taxinc,pcred,chcr,
&earncr,credit,rt,taxbc,rebate,energy,ctc,ylow,amt
common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders,
&gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100)
data tab /1000.0d0,1.5d0,3000.d0,3.d0,5000.d0,4.5d0,
& 1.e20,5.d0/
data tab82/500.0d0, 2.0d0, 3000.0d0, 4.0d0, 1.e20, 5.0d0/
data std77/5*.1d0,25*.2d0,5*1000.d0,25*2000./
data m2i/1,2,2,3,1,2,3/
c (single,joint,hoh)(po start,po end,maxstd,minstd)
data std07/
s 12*20500.d0,3*23500.d0,las*26000.d0,
b 12*30000.d0,3*33000.d0,las*35500.d0,
e 15* 2500.d0,1* 3000.d0,
n 15* 2000.d0,1* 2500.d0,
x 12*20500.d0,3*23500.d0,las*26000.d0,
2 12*30000.d0,3*33000.d0,las*35500.d0,
3 15* 7500.d0,1* 8500.d0,
4 15* 4001.d0,1* 5000.d0,
h 12*20500.d0,4*23500.d0,
2 12*30000.d0,4*33000.d0,
3 15* 4700.d0,1* 5200.d0,
4 15* 2000.d0,1* 2500.d0/
data xmp/15*20000.d0,1*50000.d0,15*50000.d0,1*100000.d0/
rt=0.
mst = int(data(2))
sep = 1
if(mst.eq.3.or.mst.eq.6) sep = 2
c AGI
c no dividend exclusion
c Unemployment income is exempt from state taxes
c state tax refund is not taxable
agi=comnew(2)+divexc(data,comnew,law)-comnew(78)-data(22)
c setax for 2011-2
if(law.eq.2011.or.law.eq.2012) then
if(comnew(175).le.14204.) then
agi = agi + .5751*(comnew(175)+data(44))
else
agi = agi + .5*(comnew(175)+data(44)) + 1067
endif
else
agi = agi + .5*(comnew(175)+data(44))
endif
c The Capital Gains are treated similar to Federal Taxes,
c except that all gains are taxable and all losses are deductible in the year in
if(comnew(6).lt.0) agi = agi + comnew(5) - comnew(6)
if(law.le.1981) then
alimon=data(23)+data(62)
agi=agi-alimon
agi=agi+comnew(12)+comnew(14)
endif
if(law.ge.1982.and.law.le.1986) agi=agi+comnew(32)
c All social security income is exempt from state taxes
if(law.ge.1984)agi=agi-comnew(79)
if(law.ge.1987) agi=agi-data(26)
c Standard Deduction
if(law.le.2006) then
stded = twn(std77(law,1)*agi,0.d0,data(7)*std77(law,2))
else
i=m2i(int(data(2)))
j=int(data(7)+sep-1.d0)
if(data(2).eq.4.d0.or.data(2).eq.7) i=3
por = ( std07(law,3,i)-std07(law,4,i))/
& (std07(law,2,i)-std07(law,1,i))
por=max(0.d0,por)
excess=max(0.d0,agi-std07(law,1,j)/sep)
stded = std07(law,3,i)/sep-excess*por
stded = twn(stded,std07(law,4,i)/sep,std07(law,3,i)/sep)
if(data(2).eq.4) then stded=1.72*stded/2.d0
endif
c XITDED
ag=max(0.0d0,agi)
if(law.le.1982) then
xitded = data(56)+data(57)+comnew(23)+data(61)
& +max(0.0d0,data(63)-.02*ag)+data(66)
else
xitded = data(56)+data(57)+comnew(23)+max(0.0d0,data(61)-.1*ag)
& +max(0.0d0,data(63)-.02*ag)+data(66)
endif
if(law.le.1991) then
xitded=xitded+max(0.0d0,max(0.0d0,data(48)-.01*ag)+
& data(49)+min(150.0d0,data(47))-.03*ag)
else if(law.ge.1992) then
xitded=xitded+max(0.0d0,data(49)-.04*ag)
endif
if(law.ge.1982) xitded=xitded+data(51)+data(54)
if(law.ge.1982) then
fica = comnew(190)
else
fica=0.
endif
if(law.le.1981)xitded=xitded-max(0.0d0,comnew(23)-ag*.15)
c accounts for deduction of fed inc tax
c tax based on withholding; don't count for credits
if(law.le.1999)fedtax=max(comnew(1),0.0d0)
if(law.ge.2000.and.law.le.2008)fedtax =
& max(comnew(52)+comnew(70)-comnew(58),0.0d0)
c 2009+ Federal Income Tax deduction worksheet
if(law.ge.2009) fedtax = max(0.0d0,
& comnew(154)+comnew(173)-comnew(59)-comnew(93))
c Child Tax credit, child care credit, eic recomputed for 2020
if(law.eq.2021) then
d101 = law
d103 = law
data(101) = 2020
data(103) = 2020
call nlaw(data,2020)
chcare = comnew(53)
chcred = comnew(81)
eitc = comnew(59)
data(101) = d101
data(103) = d103
call nlaw(data,2021)
fedtax = max(0.0d0,
& comnew(52)+comnew(173)-eitc-chcred-chcare)
endif
deduc=max(stded,xitded)+fedtax
c EXEMPTIONS
if(int(data(2)).eq.2.or.data(2).eq.4) then
exemp=3000.
else
exemp=1500.
endif
c Dependent Exemptions
if(law.le.2005) then
exemp=exemp+300*data(8)
else if(law.eq.2006) then
exemp=exemp+500*data(8)
else
e88 = 1.d0 - extnd(88)
if(agi.lt.xmp(law,1)) then
xmpdep = 1000.d0 - e88*agi/xmp(law,1)*500.d0
elseif(agi.lt.xmp(law,2)) then
po = e88*(agi-xmp(law,1))/(xmp(law,2)-xmp(law,1))
xmpdep = 500.d0*(1.d0-po)
else
xmpdep = 300.d0
endif
xmpdep = max(xmpdep,0.d0)
exemp=exemp + xmpdep*data(8)
endif
taxinc = max(0.0d0,agi-deduc-exemp-fica)
if(law.le.1981) then
call look(tab, taxinc,4,n,statax,1.0d00,0.0d0,rt,data)
else if(law.ge.1982) then
taxy = taxinc
if(mst.eq.2) taxy = taxinc/2
call look(tab82,taxy,3,n,stat,1.0d00, 0.0d0,rt,data)
statax = stat
if(mst.eq.2) statax =stat*2
endif
c deduction for solar energy credit; non-refundable
solcrd=0.
if(law.ge.1981.and.law.le.1986)solcrd=data(38)
taxbc=statax
statax=max(0.0d0,statax-solcrd)
credit = solcrd
return
end
subroutine aktax(data,comnew,statax,law)
c Personal income tax repealed in 1980 after the oil boom.
implicit double precision (A-H,O-Z)
common/calc/hy,rent,agi,exemp,stded,xitded,taxinc,pcred,chcr,
&earncr,credit,rt,taxbc,rebate,energy,ctc,ylow,amt
dimension data(255),comnew(255)
dimension aktab1(2,25),aktab2(2,25),aktab3(2,25),cred(1977:1988)
data aktab1 / 2000.0d0, 3.0d0, 4000.0d0, 3.5d0,
& 6000.0d0, 4.0d0, 8000.0d0, 5.0d0, 10000.0d0, 2.5d0,
& 12000.0d0, 6.0d0, 14000.0d0, 7.0d0, 16000.0d0, 7.5d0,
& 18000.0d0, 8.0d0, 20000.0d0, 8.5d0, 22000.0d0, 9.0d0,
& 26000.0d0, 9.5d0, 32000.0d0,10.0d0, 38000.0d0,10.5d0,
& 44000.0d0,11.0d0, 50000.0d0,11.5d0, 60000.0d0,12.0d0,
& 70000.0d0,12.5d0, 80000.0d0,13.0d0, 90000.0d0,13.5d0,
&100000.0d0,14.0d0,150000.0d0,14.0d0, 1.e20, 14.5d0,
& 0.0d0, 0.0d0, 0.0d0, 0.0d0 /
data aktab2/
|
@bodiyang Can you look at the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2705 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 14 14
Lines 2616 2616
=======================================
Hits 2578 2578
Misses 38 38
Flags with carried forward coverage won't be shown. Click here to find out more. |
The description looks good to me. Just on point, it's better to clarify |
I am completely baffled by what is going on. Can you just give me a call?
Daniel Feenberg
617-682-6204
…On Wed, 17 Jan 2024, Bodi Yang wrote:
> @bodiyang Can you look at the `Differences_Explained.md` file and let me know if I've gotten the description of the differences in the "b" set correct? Thanks!
The description looks good to me. Just on point, it's better to clarify `TAXMSIM` as `TAXSIM-35` in the 'b' file section (because the updated testing version of TAXSIM have some calculation differences from TAXSIM-35).
--
Reply to this email directly or view it on GitHub:
#2705 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
This PR works through the validation of the "b" files in the TAXSIM-35 validation suite.
To validate: