1040X-Files
I noticed this year that box 1b on my 1099-DIV from my stock purchase plan was not empty. It was exactly equal to box 1a. And that meant I had qualified dividends. Which meant, what? Turns out it means that that income is taxed at a lower rate than salary or interest income (qualified dividends appear to be treated like long-term capital gains). So, I had to fill out the Qualified Dividend and Capital Gain Tax Worksheet to figure my tax and saved a few bucks.
Then I thought, maybe I've been missing this all along? Yep, in 2003 I didn't notice. And before that, I don't see mention of it, so I'm guessing that that was an tax law change at about that time.
It seems with each year, I try something new for tax preparation. Which makes sense since they keep tweaking the rules (more on that in a bit).
This year, I decided to write a Python script to teach myself that programming language and because it appeared that Python was well suited for what I wanted to do. And it was.
Since I needed to re-calculate my 2003 taxes so I could amend that return, I went to adjust a copy of my script for 2003. Unfortunately, as things are added and deleted on the 1040 from year to year, the line numbering is inconsistent across years and some of the calculations are different too, and so I had to do a fair amount of work (this is where their always tweaking the rules made things unpleasant). It's done and I can file a 1040X now and ask for a few of my after-tax dollars back (and the IRS will probably add some nice interest to it as well, as both a friend and I have observed in the past).
I've included the script below (in redacted form, which is to say the numbers and some variable names have been altered to protect the innocent). It's essentially just a line-by-line reading of the W2 and associated worksheets translated into calculator-input with named intermediate values. I don't know what values from the tax-table to enter until I run it and am told there's an error because there is no tax-table amount for a certain dollar amount. I enter the associated line from the table and continue.
#!/usr/bin/python
w2_myCompany_box1_wages = 39321.00
w2_myCompany_box2_fed_inc_taxes_withheld = 4313.31
F1099DIV_myCompany_employeeStockPurchasePlan_1a = 100.00
F1099DIV_myCompany_employeeStockPurchasePlan_1b = 100.00
F1099INT_myCompanyteFCU = 108.68
F1099INT_anotherCreditUnion = 708.26
def taxtable(n):
# SINGLE
tt = (
(31550, 31600, 4631),
(32150, 32200, 4781),
(32250, 32300, 4806),
)
for l,h,t in tt:
if l <= n and n < h:
return t;
print "ERROR, no tax table info about amount %f" % (n)
# ****** Exemptions (page 1) ******
box6d = 1
print "box6d = %d (Total # Exemptions)" % (box6d)
# ****** Income (page 1) ******
# Wages, Salaries, etc from W2
box7 = w2_myCompany_box1_wages
print "box7 = %f" % (box7)
box8a = F1099INT_myCompanyteFCU + F1099INT_anotherCreditUnion
print "box8a = %f" % (box8a)
box9a = F1099DIV_myCompany_employeeStockPurchasePlan_1a # Ordinary dividends
print "box9a = %f" % (box9a)
box9b = F1099DIV_myCompany_employeeStockPurchasePlan_1b # Qualified dividends
print "box9b = %f" % (box9b)
box22 = box7 + box8a + box9a # Total Income
print "box22 = %f (Total Income)" % (box22)
# ****** Adjusted Gross Income (page 1) ******
box35 = 0
box36 = box22 - box35 # AGI
print "box36 = %f (AGI, page 1)" % (box36)
box37 = box36 # AGI on page 2
print "box37 = %f (AGI, page 2)" % (box37)
box39 = 4850.00 # std deduction, Single
print "box39 = %f (std deduction)" % (box39)
box40 = box37 - box39
print "box40 = %f" % (box40)
# ****** Tax and Credits (page 2) ******
if box37 < 107025:
box41 = 3100.00 * box6d
else:
print "box41 ERROR"
print "box41 = %f" % (box41)
box42 = box40 - box41 # Taxable Income
print "box42 = %f (Taxable Income)" % (box42)
#_________________________________________
print "** Line 43 worksheet, pg 34 (begin) **"
W43_L1 = box42
print "W43_L1 = %f" % (W43_L1)
W43_L2 = box9b
W43_L3 = 0 # box13 would be zero, cap gain
W43_L4 = W43_L2 + W43_L3
W43_L5 = 0 # investment interset expense on Form 4952
W43_L6 = W43_L4 - W43_L5
W43_L7 = W43_L1 - W43_L6
print "W43_L7 = %f" % (W43_L7)
W43_L8 = min(W43_L1, 29050.00)
if W43_L7 >= W43_L8:
print "W43_L9: Yes, skip 9 through 11"
else:
print "W43_L9 ERROR"
W43_L12 = min(W43_L1, W43_L6)
W43_L13 = 0 # because Line 10 is blank
W43_L14 = W43_L12 - W43_L13
W43_L15 = W43_L14 * 0.15
W43_L16 = taxtable(W43_L7)
print "W43_L16 = %f (tax on %f)" % (W43_L16, W43_L7)
W43_L17 = 0 + W43_L15 + W43_L16
W43_L18 = taxtable(W43_L1)
print "W43_L18 = %f (tax on %f)" % (W43_L18, W43_L1)
W43_L19 = min(W43_L17, W43_L18)
print "W43_L19 = %f" % (W43_L19)
print "** Line 43 worksheet, pg 34 (end) **"
#_________________________________________
box43 = W43_L19
print "box43 = %f (Tax on all taxable income)" % (box43)
#_________________________________________
print "** Line 44 worksheet, pg 35 (begin) **"
print "Not filing Schedule A"
W44_L4 = box37
W44_L5 = 40250 # Single
if W44_L4 <= W44_L5:
print "STOP, do not need to fill in Form 6251"
W44_L6 = W44_L4 - W44_L5
W44_L7 = 112500
print "W44_L4 = %f" % (W44_L4)
print "W44_L7 = %f" % (W44_L7)
if W44_L4 > W44_L7:
print "W44_L8 ERROR"
else:
W44_L10 = W44_L6
if W44_L10 > 175000:
print "W44_L11 ERROR"
W44_L11 = W44_L10 * 0.26
W44_L12 = box43
if W44_L11 > W44_L12:
print "ALT MIN TAX: must fill out Form 6251"
else:
print "ALT MIN TAX: do not need to fill in Form 6251"
print "** Line 44 worksheet, pg 35 (end) **"
#_________________________________________
box44 = 0 # Alt Min Tax. See Line 44 worksheet above.
box45 = box43 + box44
print "box45 = %f " % (box45)
box55 = 0
print "box55 = %f (total credits)" % (box55)
box56 = box45 - box55
print "box56 = %f" % (box56)
# ****** Other Taxes (page 2) ******
box62 = box56
print "box62 = %f (total tax)" % (box62)
# ****** Payments (page 2) ******
box63 = w2_myCompany_box2_fed_inc_taxes_withheld
print "box63 = %f (fed inc tax withheld on W2)" % (box63)
box70 = box63
print "box70 = %f (total payments)" % (box70)
# ****** Refund (page 2) ******
box71 = box70 - box62
print "box71 = %f (overpaid, negative if you owe)" % (box71)
I also discovered that the 1040 pdf that the IRS offers online is a fillable-form such that you can type in the values directly rather than fill it out by hand. I used Acrobat Professional since I could, but I imagine the free Acrobat Reader would work as well. Unfortunately, I did not see the worksheets offered as fillable-forms.
And so ends the tale of Taxes 2004. And 2003.