How Much is your Tax Penalty?

Webpage

One of the things I do at my work is help make content for HealthPlans.com. The web site tries to gather all of the rules, regulations, and concepts of America's health care system and translate it into something that a normal human being can understand.

Recently, our editor asked me if I could help her translate one of the more confusing health care concepts: tax penalties. You see, if a person chooses to not have health insurance, they will be charged a fee when they do their April taxes. But that fee is calculated on several conditions from household size, income and year your were insured.

What our editor wanted to do was create a tax penalty calculator that could help people figure out how much they owe or could owe. She didn't ask me to code the calculator; she just asked me to help translate the penalty law. The best way I could do that though was to translate it into code. I feel like the logic of if/ese statements and loops can sometimes be the best way to explain confusing things.

I ended up sitting down with our editor and piece by piece explained to her what all the rules HealthCare.gov was trying to say and teach her some basic developement skills all at the same time.

First, grab all the user defined variables

\$year = \$_GET['year'];
// right now can only be 2014, 2015

\$income = \$_GET['income'];
// let's just use 50000

\$filing_status = \$_GET['filing_status'];
// can only be single, headofhousehold, jointly, separate, widow

// let's say 2

\$kids = \$_GET['kids'];

Secondly, grab the rest of the variables defined by the government. These variables change depending on the year you did not have health insurance

if(\$year == 2014){

\$kid_price = 47.5;
\$income_percent = .01;
\$single_file_status = 10150;
\$joint_file_status = 20300;
\$separate_file_status = 3950;
\$widow_file_status = 16350;
\$disclaimer = '* assuming you are under 65';
\$max_flat_rate = 248;
\$max_person_rate = 2448;
\$max_family_rate = 12240;

}else if(\$year == 2015){

\$kid_price = 162.5;
\$income_percent = .02;
\$single_file_status = 10150;
\$joint_file_status = 20300;
\$separate_file_status = 3950;
\$widow_file_status = 16350;
\$disclaimer = '* assuming you are under 65 and filing thresholds are the same as 2015';
\$max_flat_rate = 975;
\$max_person_rate = 2570;
\$max_family_rate = 12850;

}

Next, we need to manipulate the user's income based on how they are filing their taxes:

if(\$filing_status == 'single'){

\$new_income = \$income - \$single_file_status;

}else if(\$filing_status == 'jointly'){

\$new_income = \$income - \$joint_file_status;

}else if(\$filing_status == 'separate'){

\$new_income = \$income - \$separate_file_status;

}else if(\$filing_status == 'widow'){

\$new_income = \$income - \$widow_file_status;

}else{

\$new_income = 0;

}

Now that \$new_income has been defined, let's figure out which of the two formulas we use and then run it

if(\$new_income >= 0){

if(\$og_penalty > \$max_flat_rate){

\$penalty = '\$' + \$max_flat_rate;

}else{

\$penalty = '\$' + \$og_penalty;

}

}else{

\$og_penalty = '\$' + \$income_percent * \$new_income;

if((\$og_penalty > \$max_family_rate){

\$penalty = '\$' + \$max_family_rate;

}else{

if(\$og_penalty > \$max_person_rate * (\$adults + \$kids)){

\$penalty = '\$' + \$max_person_rate * (\$adults + \$kids);

}else{

\$penalty = '\$' + \$og_penalty;

}

}

}

\$penalty += \$disclaimer;

}else{

\$penalty = 'no tax penalty'

}

Finally, print what ever amount the user owes onto the page

echo \$penalty;

The above is a fairly simple for a developer but I laugh at how complicated this is for the average tax payer. Man the government likes being confusing. I guess it needs a good UI developer. :P