Rand Paul tax calculator

I think this is a great idea. I don't know how it can be implemented. Whether through campaign or grass roots. But this NEEDS to be done. I cannot think of a better marketing tool. Perhaps farm the idea out to one of the PACs?

Agree, this needs to be sent to the campaign.

My number one priority is also seeing that this tool get completed for Rand. If grassroots thinks the best way to do that is to send it to the campaign I am A okay with it. But if we do I think we should also take that as a sign that we need to broaden our horizons and become more proficient at the tasks needed to compete in elections in the modern day. I can guarantee in four years I will have the knowledge and means where I can take on projects like this for the liberty movement.

If fish, cpu, and puppet don't mind chiming in on their opinion whether they would like to proceed with the project or hand it off to the campaign or pac, it would be appreciated. If you are excited about it, want to work on it, and think grassroots has the ability to produce a good end product, I'll stand behind you 100% and give it all I got.

If we do go the route of attempting to hand it off, I have no contacts within the campaign or pacs... So maybe someone who does could do that.

I'm gonna keep working on this 1040ez. No harm in handing off a more completed project if that's how it progresses.

Thanks for the input!
 
All fields are numeric strings:

Xf9Egk4.png


textfields
yr_salary
hr_wage
hr_per_week
num_deps

Most of these could alternatively use select options (dropdown) at the client.

iud83Rj.png

payroll_savings
fed_savings

the other 2 fields seem to be calculated from the above 2.

About privacy policy, some data should be retained on the server temporarily. Besides being a promotional tool, there is value in the aggregate data, like average salary, total savings, web users or mobile app users. Possibly some optional fields where they could enter demographic info.
 
Alright, this is what I got for figuring the users tax exemption:

StdExemption = HHsize * 3950

ExemptionCriteria = Income - FilingStatus

FilingStatus(single) == 254,200

FilingStatus(married) == 305,050

If (single && income < 254,201 || married && income < 305,051)

UserExemption = StdExemption

Else

If (ExemptionCriteria >= 122,500)

UserExemption= 0

Else

UserExemption = StdExemption - (((ExemptionCriteria / 2500) * .02) * StdExemption)

Sorry, I know I'm not a coder... just how it worked best logically for me.

Please check my work

zi9j5vX.png


fFPLfqE.png


1040 EZ didn't have exemption instructions so I went to 1040 form. Under the irs 1040 instructions this is on page 40. On 1040 form it is question 42 on the second page.

eta: I don't think I needed to assign single or married to a value.

quadruple eta I think: This would require another input of filing status. There is an option for married filing separately and head of household as well, which I'd be glad to add to the above if we think it is best to do so.

ohh fudge: We did need the single and married to be assigned to values to figure ExemptionCriteria.
 
Last edited:
Guys I think it would make much more sense just to query the user for figures from 2014, including how much federal tax was paid.

Back when Rand announced the plan I spent a good bit of time trying to point out that we simply dont know whether or not you are guaranteed savings under his plan. The whole reason for the plan is ostensibly to nuke the millions of lines of tax code.... well those millions of lines probably contain breaks for certain people that make them end up paying less than they would under Rands plan and we really ought to be honest about it if that is the case.

So I say to hell with trying to write an app that figures out how to compute federal taxes.... Turbo Tax has an army of people doing that and thats all they do. We aint gonna get through that.

Also re: grassroots vs campaign... if the campaign is going to do it then they arent going to use us. Theyll just pay people to do it and then it will be up next week. I think if they say no we should go ahead, and if they say yes we should just send in a donation and forget about it.
 
Doing a few things around the house and then I'll respond to the new ideas. Quick question though, does anyone know how payroll taxes work for a salaried individual? Are they generally salaried for (for instance) 40 hrs per week, and they then pay payroll taxes on those 40 hrs as if they were hourly employees?
 
All fields are numeric strings:

Xf9Egk4.png


textfields
yr_salary
hr_wage
hr_per_week
num_deps

Most of these could alternatively use select options (dropdown) at the client.

iud83Rj.png

payroll_savings
fed_savings

the other 2 fields seem to be calculated from the above 2.

About privacy policy, some data should be retained on the server temporarily. Besides being a promotional tool, there is value in the aggregate data, like average salary, total savings, web users or mobile app users. Possibly some optional fields where they could enter demographic info.


One thing I noticed is I should have used Household size instead of number of dependents. I signified this with HHsize in the formula for UserExemption but I'm open to whatever. I will use the variable names you described if I come across them while making formulas in the future.

I added the note about privacy policies over a concern voiced in the thread that spurred this one, that libertarians might be wary to enter salary info into a website... But it is an area I am ignorant in, and because of my respect for you am compelled to agree with you. I think we should develop a different privacy policy then. See below for discussion on drop down boxes.


Guys I think it would make much more sense just to query the user for figures from 2014, including how much federal tax was paid.

Back when Rand announced the plan I spent a good bit of time trying to point out that we simply dont know whether or not you are guaranteed savings under his plan. The whole reason for the plan is ostensibly to nuke the millions of lines of tax code.... well those millions of lines probably contain breaks for certain people that make them end up paying less than they would under Rands plan and we really ought to be honest about it if that is the case.

So I say to hell with trying to write an app that figures out how to compute federal taxes.... Turbo Tax has an army of people doing that and thats all they do. We aint gonna get through that.

I think there is a lot of merit to this and that it is a good idea. But I never intended for this to be a competitor to Turbo Tax or to represent the lowest tax possible under current tax law for the users of the program. That would require the user to file their taxes essentially and would be a very time consuming process. Rather, I thought of this calculator as something rather simple that would factor in only the standard deductions and exemptions in current tax law (not that I'm opposed to more functionality). And this will of course be more beneficial (that is show greater savings under Rand's tax plan) than may be the case. I do not see this as a dishonest representation though (not that you have implied that, just saying), rather a base line if you use no tax code to your advantage, etc.

I would not be surprised if even without this added functionality some users might have a higher tax under Rand. And I think for when this is the case we should print 0, and instead of a note have describing tax savings have a note talking about the millions of people it will lower taxes for, and how it will benefit everyone.

But again I think this is a good idea. We could and should add a space in the input section where the user could submit their 2014 tax bill, along with salary and household size and filing status inputs, in lieu of the program figuring out the estimated tax bill for users that choose this route.

If I get a chance tonight I will mock up a new 'embed input' and 'embed output' design concept for all the new ideas. (drop down boxes, 2014 tax bill input, etc).


Also re: grassroots vs campaign... if the campaign is going to do it then they arent going to use us. Theyll just pay people to do it and then it will be up next week. I think if they say no we should go ahead, and if they say yes we should just send in a donation and forget about it.

As I've expressed a few times, I don't have a solid foundation in software engineering/programming/nothing, so maybe my conceptions are off, but I feel like if I can tare through this tax stuff and mock up functions that we will need for the heart of this calculator to run, that it will quickly snowball to completion. I.E. we wont have a problem finishing it once the ball gets rolling. If its alright with you guys I'd like to hold off till next weekend and see where we are at before we offer it up to the campaign. You guys are much more knowledgeable on the subject though so I will heed the advice given if the grassroots disagrees.
 
CPUd, you seem like a master of data extraction... I have not found yet a formula that will accurately find an individual's tax burden by their taxable income, at least for under $100k, which over and above the 100k goes to a mathematical formula. Is there anyway to extract this data and have it entered into our own database so that when the program finds the users taxable income, it can search and find the users tax? Or maybe an open source one already exists?

6H4WUPV.png



This table starts on page 76 at this link.
 
Yeah thats possible but instead of going into a db it would probably be best to quick and dirty it by having the tabular data in a file for lookup.

I would do something like find out which syntax we are dealing with and then use Python to change that tabular text into whatever table var declaration is being used.

Also caveat... those are 2014 instructions and the numbers may be different for 2015 filing, which is another reason I'd advocate the Monday Morning QB method of just finding out what they paid and then saying well this is what would have happened under Rand's plan.
 
It would be nice for a change that a politician actually understood the taxing authority and to whom it applies. Can a man in India being paid by a U.S. Person/corporation be liable for this income tax, if not, why not?
 
Yeah thats possible but instead of going into a db it would probably be best to quick and dirty it by having the tabular data in a file for lookup.

I would do something like find out which syntax we are dealing with and then use Python to change that tabular text into whatever table var declaration is being used.

Also caveat... those are 2014 instructions and the numbers may be different for 2015 filing, which is another reason I'd advocate the Monday Morning QB method of just finding out what they paid and then saying well this is what would have happened under Rand's plan.

I was thinking about this 'Monday Morning QB method' today and and thought that for a 1.0 or first published build it might indeed be a better path. It will cut down on some work and time, it will still be able to calculate the relevant information, and individuals looking to provide more functionality could work on doing so after publication, without needing to do it quick and dirty. ;) Quick and dirty sounds like hard to update, and I agree with a need to use time relevant figures within the calculator, so an update would probably be necessary.

With that in mind, lets pretend that first post doesn't exist and begin again...

For relevancy sake, let me bump the link from CPUd earlier in the thread: http://taxfoundation.org/blog/economic-effects-rand-paul-s-tax-reform-plan

Structure of the Tax Reform Plan

Sen. Paul would make a number of changes to the tax code for individuals. He would replace the current seven tax bracket structure with a flat rate of 14.5 percent and apply that tax rate to all income – wages and salaries, capital gains, dividends, interest, and rents.

The plan would include a $15,000 standard deduction (per filer) and a $5,000 per person personal exemption. This means that a family of four would pay no income tax on their first $50,000 of income ($55,000 for a family of five, etc.).

Retirement accounts remain as they currently are and in our modeling we assumed that the exclusion for employer-provided health care remains.

The plan retains home mortgage and charitable deductions, the earned income tax credits, and the child tax credit and eliminates all other tax credits and deductions.

The plan would eliminate the payroll tax, the estate tax, and all customs duties and tariffs.

On the business side, the plan would eliminate the corporate tax, create a territorial type system, and introduce a 14.5 percent business transfer tax. This tax would be levied on a business’s factors of production and tax all capital income (profits, rents, royalties) and all labor payments (wages and salaries). All capital expenses (machines, equipment, buildings, etc.) are fully expensed in the first year, which would do away with current depreciation schedules. This tax would also apply to wages paid by governments and nonprofits.

There are obviously a lot more inputs we are going to need then I was thinking if we want to represent Rand's plan 'reasonably well', to put it mildly. I need to sit down and digest what parts of Rand's tax plan are specific enough that they can be included in the calculation. I hope I do not sound demoralized, just a bit of a needed reality check. I'll be back in a few days with another swing at this.
 
Last edited:
Here is a csv I made of the 2014 table. The first column with the field names should probably be renamed to something shorter and cleaner.

Thank you CPUd. For reference, when you came up with the users taxable income, how would you have the program search this file to find the right A and B row which matches to it? And if you don't mind, how did you convert it into such a file?
 
Thank you CPUd. For reference, when you came up with the users taxable income, how would you have the program search this file to find the right A and B row which matches to it? And if you don't mind, how did you convert it into such a file?

Exactly how it is done depends on the language/implementation, but generally you would read the csv into a structure (using a csv library) that could be described as an array of n records like this:

Code:
tbl = [
  {a0,b0,c0,d0,e0,f0},
  {a1,b1,c1,d1,e1,f1},
  ...,
  {an,bn,cn,dn,en,fn}
]



Since it is not looking for an exact match on 1 field, you probably will have to tell it how to find the correct row. A simple compare function like this could be defined:

Code:
compare(A,B,Z)
{
   return ((Z >= A) && (Z < B))
}

Most of these scripting languages have search/find functions built into their objects, and the most you would have to do is define a compare function and pass it to the search function along with the search value, something like this:

tbl.find(Z, compare)


Under the hood of find():

To find the correct row, the first instinct might be to tell the program to start at the first row and check each one until compare is true. This works, but there are faster approaches. Assume a case where the correct row is the very last one, then it would take n compare calls to find it. The built in find() will probably use a binary search, where for an array size n, the first check will be at tbl[n/2]. If compare is false, the next check will be at tbl[n/4] or tbl[(n - n/2) / 2], depending on whether Z < A or Z > B. This approach would at worst take log[SUB]2[/SUB](n) compare calls.

From there, the program would get 1 of the other 4 values, depending on filing status. This could also be added to the compare function so a single value would be returned (as opposed to the whole row) in one fell swoop. Technically, this would take log[SUB]2[/SUB](n) + 4 compare calls, but most people still call it log[SUB]2[/SUB](n).


The source comes from the HTML version of the 1040:
http://www.irs.gov/instructions/i1040gi/ar02.html

I just used text replacement to convert the html table to a csv.
 
Last edited:
Exactly how it is done depends on the language/implementation, but generally you would read the csv into a structure (using a csv library) that could be described as an array of n records like this:

Code:
tbl = [
  {a0,b0,c0,d0,e0,f0},
  {a1,b1,c1,d1,e1,f1},
  ...,
  {an,bn,cn,dn,en,fn}
]



Since it is not looking for an exact match on 1 field, you probably will have to tell it how to find the correct row. A simple compare function like this could be defined:

Code:
compare(A,B,Z)
{
   return ((Z >= A) && (Z < B))
}

Most of these scripting languages have search/find functions built into their objects, and the most you would have to do is define a compare function and pass it to the search function along with the search value, something like this:

tbl.find(Z, compare)


Under the hood of find():

To find the correct row, the first instinct might be to tell the program to start at the first row and check each one until compare is true. This works, but there are faster approaches. Assume a case where the correct row is the very last one, then it would take n compare calls to find it. The built in find() will probably use a binary search, where for an array size n, the first check will be at tbl[n/2]. If compare is false, the next check will be at tbl[n/4] or tbl[(n - n/2) / 2], depending on whether Z < A or Z > B. This approach would at worst take log[SUB]2[/SUB](n) compare calls.

From there, the program would get 1 of the other 4 values, depending on filing status. This could also be added to the compare function so a single value would be returned (as opposed to the whole row) in one fell swoop. Technically, this would take log[SUB]2[/SUB](n) + 4 compare calls, but most people still call it log[SUB]2[/SUB](n).


The source comes from the HTML version of the 1040:
http://www.irs.gov/instructions/i1040gi/ar02.html

I just used text replacement to convert the html table to a csv.

Thanks CPUd.

You must spread some Reputation around before giving it to CPUd again.
 
**Individual Income section**

14.5% tax on all taxable income

$15k standard deduction per filer
$5k per person personal exemption

**Unknown: Can a family with a working child include the child's income on their tax return and treat them as a third filer? So then a family of four with one working child's standard deduction would be $65k?**

retirement accounts remain as they are

**assumption by article publishers** exclusion for employer provided heath care remains

I'm thinking this is an exclusion so employees don't have to include heath care benefits as income?

Retains homes mortgage deduction

retains charitable deductions

retains earned income tax credits

retains child tax credit

eliminates payroll tax

eliminates estate tax

eliminates customs duties and tariffs

**unknown** Most people wouldn't have the record keeping to figure this savings even if we provided a calculator that could. A note somewhere on the calculator detailing how much eliminating duties and tariffs would save US consumers would be the best route IMO. We could attempt to estimate though.


A few unknowns and a bit of work but not to bad.


**Business tax section**

1. 14.5% business transfer tax
Levied on business factors of production
Tax all capital income (profits, rents, royalties)
Capital expenses expended in first year
Tax all labor payments
Labor payments by non-profits is taxed, also government labor payments
eliminates payroll tax

I think the business tax section will be fairly easy we just need to make sure we word it correctly to get the correct inputs. I think a different way to word the above would be that labor and material input expenses are now considered as profits.

I think: (Revenues – capital expenditures + labor costs + input costs) * 14.5%= Corporate tax ?

Tonight/tomorrow I'll work on digging through the tax code to see what inputs we'll need for the individual income tax section. Thoughts on whether I've expressed the corporate tax plan correctly? I think clarification from the campaign will be necessary to figure out how the filing system works, i.e. if multiple filers on the same tax bill is marriage dependent or by some other means. Time is short, more to come in the next few days...
 
Wow, just noticed this thread. Epic work gentlemen.

I know absolutely nothing about programming, but let me know if there's anything else I can help with.

godspeed
 
Rather poetic that the greatest difficulty in creating this calculator is the complexity of the existing tax code, eh?

:cool:

Anyway, FWIW, here's a simple formula to calculate liability under Rand's plan, for someone taking the standard deduction.

User Input:
monthly income (I)
single or married
# of dependents (D)

Output:
monthly tax liability (T)

If single: T = [.145 x (12I - 15000 - D5000)]/12
If married: T = [.145 x (12I - 30000 – D5000)]/12

That's the easy part.

For itemized returns under Rand's plan, you need to consider two deductions (mortgage and charitable) and two credits (child and earned income).

P.S. As for the present tax code, you might want to check out wordpress plugins. I know they have income tax calculators, and I guess you can view the code?

@P3ter

I think it might be best to compare Rand's income tax to the existing income + payroll taxes, leaving out everything else. It's impossible to calculate the increase in living costs caused by Rand's business tax; and equally impossible to calculate the decrease in living costs caused by Rand's elimination of excise taxes and duty. Gift and estate are actually fairly simple, but they only affect a tiny fraction of the population (i.e. a tiny fraction of people who'd be using this calculator). IMO, the idea should be for the average working person to see how much more they'll have in their paycheck each month. This is the simplest way and puts Rand's plan in the best light.
 
Last edited:
Back
Top