PDA

View Full Version : Rand Paul tax calculator




P3ter_Griffin
08-14-2015, 03:38 PM
What?

Rand Paul tax plan calculator.

Why?

To highlight and bring attention to Rand Paul's tax plan, and how much it can save an individual. To motivate an individual to donate to Rand Paul. Possibly a source of ad revenue.

Who?

Collaborative grassroots project meant to reach any and all potential voters, focused towards individuals who think lower taxes are good.

When?

Now. The sooner the completion the better.

Where?

Everywhere. The ability to embed on websites, forums, and money bombs. The ability to interact with the calculator through social media sites like facebook and twitter.

Ownership:

Ronpaulforums.com / open source


Inputs:

Yearly salary or hourly wage and number of hours worked per week. Household size.


Outputs:

Tax savings under Rand's plan:
1. savings from elimination of payroll taxes
2. savings from reduced tax rate
3. total savings
4. savings per week

Blackbox:

1. calculate users (estimated?) payroll taxes ceteris paribus, display amount as payroll savings
2. calculate users (estimated?) tax rate ceteris paribus, calculate users (estimated?) tax rate under Rands plan. Subtract the latter from the former to display savings from reduced tax rate.
3. Add totals from numbers 1 and 2 together to display total savings.
4. Divide total from number 3 by 52 to provide savings per week.

Other possible solutions include figuring a percentage of total savings (6.75% has been offered as it amounts to payroll tax saving iirc) to prompt a user for a donation in that amount. Useful for money bombs and etc.

Data needed for black box functions:

Rand Paul's tax plan in mathematical formula. Current tax plan in mathematical formula, not including tax loopholes etc.


Hosting?:

Ronpaulforums.com? It does provide an opportunity for ad revenue so maybe some else would like to host it? I have not asked RPF admin if they would host it, this is an unknown.


Design

Embed Input:

http://i.imgur.com/Xf9Egk4.png

Embed Output:

http://i.imgur.com/iud83Rj.png


As mentioned above, we may want the ability to include more functions such as calculating a suggested donation amount, etc.


Twitter in and out:

http://i.imgur.com/cwc34Bv.png

Concept is that someone would tweet to RPF (or rand) with a hashtag to signify salary input and a hashtag to signify household size input, then a bot of some sort would send the request to the hosting website, and feed the output back to the user through twitter.

Facebook:

I have never used facebook and I don't know how we could best set up intractability with facebook (ie would embed work? something more similar to twitter?)

Thoughts?



Shout out to Revolution 3.0 for the idea (http://www.ronpaulforums.com/showthread.php?480234-Ladies-and-Gentlemen-it-s-time-for-a-Moneybomb&p=5956387#post5956387).

dannno
08-14-2015, 03:44 PM
Great idea - it might be better to do monthly savings though instead of weekly, most people budget for the month and think in terms of monthly income/rent/car payments/etc.

Warrior_of_Freedom
08-14-2015, 03:44 PM
i would like a tax form with a check box to request none of your taxes fund overseas war efforts

puppetmaster
08-14-2015, 03:58 PM
I like it. I could do it if I had the details of the plan.

P3ter_Griffin
08-14-2015, 04:31 PM
I like it. I could do it if I had the details of the plan.

+rep

That is what I like to hear. Then shall we make it the first order of business to establish the mathematical formulas that best resemble the tax plans? Anyone feel free to beat me to it. I'll work on it over the weekend. If it is agreeable to you puppet, you can take the rein on the Rand Paul tax calculator?

P3ter_Griffin
08-14-2015, 04:43 PM
+rep

That is what I like to hear. Then shall we make it the first order of business to establish the mathematical formulas that best resemble the tax plans? Anyone feel free to beat me to it. I'll work on it over the weekend. If it is agreeable to you puppet, you can take the rein on the Rand Paul tax calculator?

First question, Rand calls for a $50k standard deduction for a family of 4... does this expand out to 12,250 deduction per individual?

jllundqu
08-14-2015, 04:44 PM
Freaking-bump-sticky-rep-this-thang!

SilentBull
08-14-2015, 04:51 PM
I like this idea.

phill4paul
08-14-2015, 05:00 PM
Frikken awesome stuff! This idea needs to be sent to Rand's campaign. It will have to work close with them. I don't understand the plan enough to really comment much. I think it is a good idea, this tax calculator. From what I understand FICA would no longer be automatically deducted from an individuals paycheck. This would be a huge draw in showing what weekly/monthly take home would yield. I've never really understood Rand's pay in. It seems that the paycheck income tax is nullified but what then? One yearly payment?

CPUd
08-14-2015, 05:32 PM
Could possibly use this:


http://taxfoundation.org/blog/economic-effects-rand-paul-s-tax-reform-plan

Personal Income Tax and Payroll Tax:



Compare how much you pay now with how much you'll pay under Rand's plan. To figure out your income tax liability under the current system (assuming you don't know it off the top of your head), use this calculator (http://www.efile.com/tax-service/tax-calculator/).Separately, take your total wages and multiply by 7.65% (payroll taxes). Add these two numbers together. To figure out your liability under Rand's system, take your total income, subtract the proper deductions/exemptions (see article above for details), and multiply the remainder by 14.5%.

Tell us how much you'll save!

For a general idea of how this will affect people at different income levels:

Single Filer, 1 Exemption, No Dependents, $15,000 wages
Current System = $485 (income tax) +$1147 (payroll tax) = $1632
Rand's System = $0
Savings = $1632(100% cut)

Single Filer, 1 Exemption, No Dependents, $20,000wages
Current System = $1024 (income tax) + $1530 (payroll tax) =$2554
Rand's System = $0
Savings = $2554 (100% cut)

Single Filer, 1 Exemption, No Dependents, $25,000 wages
Current System =$1774 (income tax) + $1912 (payroll tax) = $3686
Rand's System =$725
Savings = $2961 (80% cut)

Single Filer, 1 Exemption, No Dependents, $30,000 wages
Current System = $2524 (income tax) +$2295 (payroll tax) = $4819
Rand's System = $1450
Savings =$3369 (70% cut)

Single Filer, 1 Exemption, No Dependents, $35,000 wages
Current System = $3274 (income tax) + $2677 (payroll tax) = $5951
Rand's System = $2175
Savings = $3776 (63%cut)

Single Filer, 1 Exemption, No Dependents, $40,000wages
Current System = $4024 (income tax) + $3060 (payroll tax) =$7084
Rand's System = $2900
Savings = $4184 (59% cut)

Single Filer, 1 Exemption, No Dependents, $45,000 wages
Current System =$4774 (income tax) + $3442 (payroll tax) = $8216
Rand's System =$3625
Savings = $4591 (56% cut)

Single Filer, 1 Exemption,No Dependents, $50,000 wages
Current System = $5819 (income tax) +$3825 (payroll tax) = $9644
Rand's System = $4350
Savings = $5294 (55% cut)

Single Filer, 1 Exemption, No Dependents,$60,000 wages
Current System = $8319 (income tax) + $4590 (payroll tax) = $12909
Rand's System = $5800
Savings = $7109 (55%cut)

Single Filer, 1 Exemption, No Dependents, $70,000wages
Current System = $10819 (income tax) + $5355 (payroll tax) =$16174
Rand's System = $7250
Savings = $8924 (55% cut)

Single Filer, 1 Exemption, No Dependents, $80,000 wages
Current System =$13319 (income tax) + $6120 (payroll tax) = $19439
Rand's System =$8700
Savings = $10739 (55% cut)

Single Filer, 1 Exemption,No Dependents, $90,000 wages
Current System = $15819 (income tax)+ $6885 (payroll tax) = $22704
Rand's System = $10150
Savings =$12554 (55% cut)

Single Filer, 1 Exemption, No Dependents,$100,000 wages
Current System = $18334 (income tax) + $7650(payroll tax) = $25984
Rand's System = $11600
Savings = $14384(55% cut)

As reflected in the figures above,Rand's plan eliminates the employee portion of payroll tax, but it also eliminates the employer portion.

The plan also eliminates:

1. estate tax
2. gift tax
3. excise tax
4. customs duties

Finally, the existing corporate income tax will be replaced with a 14.5% flat-rate corporate income tax with fewer deductions.

In total, the plan reduces federal taxes by about $300 billion per year.

RDM
08-14-2015, 05:32 PM
Great idea - it might be better to do monthly savings though instead of weekly, most people budget for the month and think in terms of monthly income/rent/car payments/etc.

Why not have a drop down box where the user can choose weekly, monthly or yearly savings.

Carlybee
08-14-2015, 05:41 PM
Make it an app

puppetmaster
08-14-2015, 10:36 PM
+rep

That is what I like to hear. Then shall we make it the first order of business to establish the mathematical formulas that best resemble the tax plans? Anyone feel free to beat me to it. I'll work on it over the weekend. If it is agreeable to you puppet, you can take the rein on the Rand Paul tax calculator? shoot go for it. I will try to get time but 2 young kids and a full time job and a half keep me busy....and then there's the farm....yeah you better take it if you want. I will offer any assistance you need!

puppetmaster
08-14-2015, 10:37 PM
Why not have a drop down box where the user can choose weekly, monthly or yearly savings.

Nice

fisharmor
08-14-2015, 10:59 PM
First things first. Need a design doc that breaks it down into subtasks. I dont do web dev but if I see item 5a is a jsp that takes yearly income in and spits out estimated payroll tax ( or whatever small task ) I can bang that out between things. Might take me a week compared to a pro doing it in 2 hrs but many hands make light work. Trick is to get it divided early.

I have some space, unlimited hdd and bandwidth (cap is on proc use) but as I said this has never been my strong suit so Id need a grown up helping configure it.

CPUd
08-15-2015, 12:04 AM
For a site + possible mobile apps and several people working on it, might be cleaner to have a web-based backend that accepts GET/POST data and returns JSON or XML.

fisharmor
08-15-2015, 09:28 AM
Morning bump

Lol thats what I mean cpud... I understand what you wrote and can do whatever subtasks are defined as long as I can reach Google.
What I can't do is write the spec.

P3ter_Griffin
08-15-2015, 01:49 PM
Great idea - it might be better to do monthly savings though instead of weekly, most people budget for the month and think in terms of monthly income/rent/car payments/etc.


Why not have a drop down box where the user can choose weekly, monthly or yearly savings.


I agree. If whoever programs the logic and design for this part of the program finds that having a drop down box is too difficult though, a monthly period may be better for the reasons dannno mentioned and that the dollar amount will be larger. Or maybe a function which looks at what, first, the users total 12 month tax savings will be, then divides that by 12 to get monthly savings, compares that to a given value (say < $600) and if it is less than $600, it prints the monthly amount, otherwise divide it by 52 and return a weekly amount.



Make it an app

I agree. After I submitted this yesterday I was thinking... I didn't do anything for a mobile app... lol. probably one of the biggest markets. it shows I don't have a cellphone.


shoot go for it. I will try to get time but 2 young kids and a full time job and a half keep me busy....and then there's the farm....yeah you better take it if you want. I will offer any assistance you need!

Family comes first over this way too. :) Any assistance from you and anyone else is much appreciated. I've done a few code academy programming projects, but I'd say I'm a far cry from even an amateur programmer.


First things first. Need a design doc that breaks it down into subtasks. I dont do web dev but if I see item 5a is a jsp that takes yearly income in and spits out estimated payroll tax ( or whatever small task ) I can bang that out between things. Might take me a week compared to a pro doing it in 2 hrs but many hands make light work. Trick is to get it divided early.

I have some space, unlimited hdd and bandwidth (cap is on proc use) but as I said this has never been my strong suit so Id need a grown up helping configure it.


For a site + possible mobile apps and several people working on it, might be cleaner to have a web-based backend that accepts GET/POST data and returns JSON or XML.

lol. This is a foreign language to me. I think could build the functions within this calculator if given enough time... but it would just be stuck in my compiler after I was done. ;) I'm more than willing to read up on what you guys are talking about if help is needed, advice on good resources would be helpful if help is needed. Thank you!




I'm about to print off 1040 ez and instructions and get to work on putting it in some logical order. I really enjoy math but don't find many practical uses in my everyday life, so I am a little excited. I haven't gotten anything done as far as Rand's plan yet.

phill4paul
08-15-2015, 02:06 PM
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?

LatinsforPaul
08-15-2015, 02:08 PM
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.

P3ter_Griffin
08-15-2015, 02:40 PM
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!

CPUd
08-15-2015, 05:19 PM
All fields are numeric strings:

http://i.imgur.com/Xf9Egk4.png

textfields
yr_salary
hr_wage
hr_per_week
num_deps

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

http://i.imgur.com/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.

P3ter_Griffin
08-15-2015, 05:22 PM
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

http://i.imgur.com/zi9j5vX.png

http://i.imgur.com/fFPLfqE.png

1040 EZ didn't have exemption instructions so I went to 1040 form. Under the irs 1040 instructions (http://www.irs.gov/pub/irs-pdf/i1040gi.pdf) this is on page 40. On 1040 form (http://www.irs.gov/pub/irs-pdf/f1040.pdf) 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.

fisharmor
08-15-2015, 05:38 PM
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.

satchelmcqueen
08-16-2015, 10:44 AM
i love it! do it please! people need to see the real numbers.

P3ter_Griffin
08-16-2015, 03:47 PM
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?

P3ter_Griffin
08-16-2015, 05:03 PM
All fields are numeric strings:

http://i.imgur.com/Xf9Egk4.png

textfields
yr_salary
hr_wage
hr_per_week
num_deps

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

http://i.imgur.com/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.

P3ter_Griffin
08-16-2015, 06:00 PM
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?

http://i.imgur.com/6H4WUPV.png


This table starts on page 76 at this link (http://www.irs.gov/pub/irs-pdf/i1040gi.pdf).

fisharmor
08-16-2015, 06:28 PM
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.

CPUd
08-16-2015, 07:58 PM
Here is a csv (http://www.filedropper.com/1040under100k) I made of the 2014 table. The first column with the field names should probably be renamed to something shorter and cleaner.

Danke
08-16-2015, 08:10 PM
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?

P3ter_Griffin
08-17-2015, 08:22 PM
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.

P3ter_Griffin
08-17-2015, 08:39 PM
Here is a csv (http://www.filedropper.com/1040under100k) 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?

CPUd
08-17-2015, 09:57 PM
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:



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:



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 log2(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 log2(n) + 4 compare calls, but most people still call it log2(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.

P3ter_Griffin
08-19-2015, 12:47 PM
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:



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:



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 log2(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 log2(n) + 4 compare calls, but most people still call it log2(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.

P3ter_Griffin
08-19-2015, 07:43 PM
**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...

P3ter_Griffin
08-26-2015, 07:51 PM
A couple crazy weeks and I hope I'll have more time for this. Sorry for my lack of progress!

r3volution 3.0
08-26-2015, 08:46 PM
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

groverblue
08-26-2015, 10:30 PM
I'm a developer. If you need any help let me know. I can do a website and an android app if needed.

r3volution 3.0
08-26-2015, 11:16 PM
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.

r3volution 3.0
08-27-2015, 12:25 AM
Here's a formula for calculating payroll tax liability under the present system:

User Input
monthly wages (W)

Output
monthly tax liability (T)

If (12W) < 118500: T = W x .0765
If (12W) > 118500: T = (9875 x .0765) + [(W – 9875) x .0145]

kcchiefs6465
08-27-2015, 01:34 AM
Thanks CPUd.

You must spread some Reputation around before giving it to CPUd again.

Gladly covered.

r3volution 3.0
09-04-2015, 08:02 PM
bump

satchelmcqueen
09-06-2015, 11:36 AM
does the campaign know about this great idea? if not i will email them tonight.

P3ter_Griffin
09-07-2015, 11:44 AM
does the campaign know about this great idea? if not i will email them tonight.

As far as I know they do not.

P3ter_Griffin
09-07-2015, 11:53 AM
Shit is still crazy over this way. But I have not forgotten.

r3volution 3.0
09-19-2015, 04:00 PM
bump

kfarnan
09-19-2015, 08:07 PM
i would like a tax form with a check box to request none of your taxes fund overseas war efforts

This would be better. How about end the fed along with the income tax.

Suzu
09-20-2015, 01:36 PM
**Individual Income section**

14.5% tax on all taxable income

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



Do you mean that anyone who earns $20k or less pays no federal income tax?

I'd like to see a simple calculator where you input your annual income + number of dependents and get a tax amount as the result.

Tinnuhana
09-21-2015, 07:54 AM
Single Filer, 1 Exemption, No Dependents,$60,000 wages
Current System = $8319 (income tax) + $4590 (payroll tax) = $12909
Rand's System = $5800
Savings = $7109 (55%cut)

Wow! That's five months worth of mortgage payments each year for me.

P3ter_Griffin
09-23-2015, 08:44 AM
bump

Thanks for the bump. This hiatus started as a fun journey for the GF and I. We were going to sell our house, buy a new one, pitch and hopefully start a new property management company with family, and I was set to start a EE program as well. Unfortunately things have turned a bit more somber as we are providing end of life cares for my GF's grandmother. There have been plenty of bright moments however too. God continues to answer our prayers to give her more good painfree time. 3 weeks ago we had to call her children as we and the nurses thought she may be on her last day. But she bounced back. 5 days ago we were told she had 2 days tops, had a fever of 105 and severely abnormal resperations. Once again she has bounced back. God is truly great. I will only have passing moments to spend on RPF until she passes and I have helped my GF through the grieving process. Which I hope for grandmas sake is far off. Anyone feel free to take this concept as your own and run with it. Otherwise when I get back I'll get back to it.

<3

P3ter_Griffin
09-23-2015, 08:47 AM
Do you mean that anyone who earns $20k or less pays no federal income tax?

I'd like to see a simple calculator where you input your annual income + number of dependents and get a tax amount as the result.

Indeed, a family of four gets a 50k deduction. 15k per filer (x2) and 5k per individual (x4).

Eric21ND
09-23-2015, 12:38 PM
So a single filer making 50k would pay $4350?

r3volution 3.0
09-23-2015, 01:54 PM
So a single filer making 50k would pay $4350?

Yes

P3ter_Griffin
09-30-2015, 11:43 AM
Seems like it may be time to dig a little deeper. I'll work on putting together the input and direction we were heading and then creating a new first post, and if there is agreement that it is indeed the direction we should be heading, we can create a new RPTax Calculator thread so people can get right to the meat and potatoes. Life is still happening around us but I'll see what I can do.

r3volution 3.0
10-20-2015, 11:05 PM
bump