Another important real-world application of Piecewise Functions is in the filing of federal income taxes.
We shall illustrate this application by filing the "Single" option for the $2018$ federal tax return.
We shall design a calculator for these taxes.
We shall verify our calculations with the calculators of some tax companies.
For the simple calculations (only taxes), we shall verify it using the:
calculator from TaxAct
Let us define some important terms used in Income Taxes.
The gross income is the total yearly income. This is the total income earned in a year.
It is the total pre-tax earnings for the year.
Let the gross income = $GI$
Sometimes, there are certain portions of the gross income that is not taxed.
In other words, there are certain untaxed portions of the gross income.
Those untaxed portions of the gross income are known as deductions or adjustments.
Let the adjustments = $A$
The difference between the gross income and the adjustments is known as the adjusted gross income
Let the adjusted gross income = $AGI$
The adjusted gross income is the income after allowable tax deductions.
The information used for the 2018 tax rates, standard deductions, and exemptions is found in these websites:
(1.) Bankrate
(2.) Forbes
Ask students to compare and contrast the two tables.
The information from the first website (Bankrate) is summarized here.
We shall work with this one first.
Tax Rate |
Single |
Head of household |
Married Filing Jointly
Or Qualifying Widow
|
Married Filing Separately |
$10\%$ |
Up to $\$9,525$ |
Up to $\$13,600$ |
Up to $\$19,050$ |
Up to $\$9,525$ |
$12\%$ |
$\$9,526 \:\:to\:\: \$38,700$ |
$\$13,601 \:\:to\:\: \$51,800$ |
$\$19,051 \:\:to\:\: \$77,400$ |
$\$9,526 \:\:to\:\: \$38,700$ |
$22\%$ |
$\$38,701 \:\:to\:\: \$82,500$ |
$\$51,801 \:\:to\:\: \$82,500$ |
$\$77,401 \:\:to\:\: \$165,000$ |
$\$38,701 \:\:to\:\: \$82,500$ |
$24\%$ |
$\$82,501 \:\:to\:\: \$157,500$ |
$\$82,501 \:\:to\:\: \$157,500$ |
$\$165,001 \:\:to\:\: \$315,000$ |
$\$82,501 \:\:to\:\: \$157,000$ |
$32\%$ |
$\$157,501 \:\:to\:\: \$200,000$ |
$\$157,501 \:\:to\:\: \$200,000$ |
$\$315,001 \:\:to\:\: \$400,000$ |
$\$157,001 \:\:to\:\: \$200,000$ |
$35\%$ |
$\$200,001 \:\:to\:\: \$500,000$ |
$\$200,001 \:\:to\:\: \$500,000$ |
$\$400,001 \:\:to\:\: \$600,000$ |
$\$200,001 \:\:to\:\: \$300,000$ |
$37\%$ |
$\$500,001 \:\:or\:\: more$ |
$\$500,001 \:\:or\:\: more$ |
$\$600,001 \:\:or\:\: more$ |
$\$300,001 \:\:or\:\: more$ |
Let us calculate the taxes for the filing "Single" option.
We shall test each piece.
Calculate the taxes for single individuals whose taxable incomes are:
(1.) $\$7,000.00$
(2.) $\$12,575.00$
(3.) $\$43,750.00$
(4.) $\$120,327.00$
(5.) $\$165,428.00$
(6.) $\$234,543.00$
(7.) $\$700,712.00$
Simplify the percents.
$
10\% = \dfrac{10}{100} = 0.1 \\[5ex]
12\% = \dfrac{12}{100} = 0.12 \\[5ex]
22\% = \dfrac{22}{100} = 0.22 \\[5ex]
24\% = \dfrac{24}{100} = 0.24 \\[5ex]
32\% = \dfrac{32}{100} = 0.32 \\[5ex]
35\% = \dfrac{35}{100} = 0.35 \\[5ex]
37\% = \dfrac{37}{100} = 0.37
$
Solution: $1st$ Method: Manual/Arithmetic Method
(1.) $\$7,000.00$ falls in the first piece.
tax for $\$7000.00$ income @ $10\%$ per $\$$ earned = $7000 * 0.1 = 700$
tax for taxable income of
$\$7,000.00$ =
$\$700.00$
(2.) $\$12,575.00$ falls in the second piece.
Before we use the second piece, we have to go through the first piece first.
First Piece for $\$9525.00$
$9525.00$ of the $12575.00$ is taxed at $10\%$
tax for $\$9525.00$ income @ $10\%$ per $\$$ earned = $9525.00 * 0.1 = 952.50$
We are done with the maximum taxable income that can be taxed at the first piece of $10\%$
We have to move on to the second piece.
$12575.00 - 9525.00 = 3050.00$
The rest of the $\$3050.00$ is taxed at $12\%$
Second Piece for $\$3050.00$
tax for $\$3050.00$ income @ $12\%$ per $\$$ earned = $3050.00 * 0.12 = 366.00$
$952.50 + 366.00 = 1318.50$
tax for taxable income of
$\$12,575.00$ =
$\$1,318.50$
(3.) $\$43,750.00$ falls in the third piece.
Before we use the third piece, we have to go through the first and second pieces.
First Piece for $\$9525.00$
$9525.00$ of the $12575.00$ is taxed at $10\%$
tax for $\$9525.00$ income @ $10\%$ per $\$$ earned = $9525.00 * 0.1 = 952.50$
We are done with the maximum taxable income that can be taxed at the first piece of $10\%$
We have to move on to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
Student: So, do we need to subtract $9525.00$ from $43750.28$
Teacher: No, we do not.
Here is the thing.
We know already that $43750.28$ falls in the third tax bracket.
Student: That is correct.
Teacher: $9,525$ of that money is taxed at $10\%$
Student: Okay...
Teacher: Any money above $9525$ but not exceeding $38700$ is taxed at $12\%$
Not all the money (43750.00 - 9525 = 34225.00) is taxed at $12\%$
Let us look at it this way
For $43750.28$
$[0, 9525]$ is taxed at $10\%$
$(9525, 38700]$ is taxed at $12\%$
$(38700, 43750.28]$ is taxed at $22\%$
Do you realize the mistake that would have been made if $34225.00$ was taxed at $12\%$
Student: Yes, the U,S government would lose money.
Teacher: That is right...and we do not ...
Student: want them to lose money.
Teacher: Correct. That money could be used to help the poor.
Student: I hope they help poor people. There is a high rate of hunger and poverty in the world.
Teacher: I hope and pray so too.
So, as you can see:
The range of $9525 - 0 = 9525$ is taxed at $10\%$
Student: The range of $38700 - 9525 = 29175$ is taxed at $12\%$
Teacher: Correct! Go ahead...
Student: and the range of $43750.00 - 38700 = 5050.00$ is taxed at $22\%$
Teacher: Perfecto!
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We have to move on to the third piece.
$43750.00 - 38700.00 = 5050.00$
The rest of the $\$5050.00$ is taxed at $22\%$
Third Piece for $\$14575.00$
tax for $\$5050.00$ income @ $22\%$ per $\$$ earned = $5050.00 * 0.22 = 1111.00$
$952.50 + 3501.00 + 1111.00 = 5564.50$
tax for taxable income of
$\$43,750.00$ =
$\$5,564.50$
(4.) $\$120, 327.00$ falls in the fourth piece.
Before we use the fourth piece, we have to go through the first, second, and third pieces.
First Piece for $\$9525.00$
$9525.00$ of the $12575.00$ is taxed at $10\%$
tax for $\$9525.00$ income @ $10\%$ per $\$$ earned = $9525.00 * 0.1 = 952.50$
We are done with the maximum taxable income that can be taxed at the first piece of $10\%$
We move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the third piece of $22\%$
We move to the fourth piece.
$120327.00 - 82500.00 = 37827.00$
The rest of the $\$37827.00$ is taxed at $24\%$
Fourth Piece for $\$37827.00$
tax for $\$37827.00$ income @ $24\%$ per $\$$ earned = $37827.00 * 0.24 = 9078.48$
$952.50 + 3501.00 + 9636.00 + 9078.48 = 23167.98$
tax for taxable income of
$\$120,327.00$ =
$\$23,167.98$
(5.) $\$165, 428.00$ falls in the fifth piece.
Before we use the fifth piece, we have to go through the first, second, third, and fourth pieces.
First Piece for $\$9525.00$
$9525.00$ of the $12575.00$ is taxed at $10\%$
tax for $\$9525.00$ income @ $10\%$ per $\$$ earned = $9525.00 * 0.1 = 952.50$
We are done with the maximum taxable income that can be taxed at the first piece of $10\%$
We move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the third piece of $22\%$
We move to the fourth piece.
We need to calculate the range of taxable income that should be taxed at the fourth tax rate.
$157500.00 - 82500.00 = 75000.00$
$\$75000.00$ is taxed at $24\%$
Fourth Piece for $\$75000.00$
tax for $\$75000.00$ income @ $24\%$ per $\$$ earned = $75000.00 * 0.24 = 18000.00$
We are done with the maximum taxable income that can be taxed at the fourth piece of $24\%$
We move to the fifth piece.
$165428.00 - 157500.00 = 7928.00$
The rest of the $\$7928.00$ is taxed at $32\%$
Fifth Piece for $\$7928.00$
tax for $\$7928.00$ income @ $32\%$ per $\$$ earned = $7928.00 * 0.32 = 2536.96$
$952.50 + 3501.00 + 9636.00 + 18000 + 2536.96 = 34626.46$
tax for taxable income of
$\$165,428.00$ =
$\$34,626.46$
(6.) $\$234,543.00$ falls in the sixth piece.
Before we use the sixth piece, we have to go through the first, second, third, fourth, and fifth pieces.
First Piece for $\$9525.00$
$9525.00$ of the $12575.00$ is taxed at $10\%$
tax for $\$9525.00$ income @ $10\%$ per $\$$ earned = $9525.00 * 0.1 = 952.50$
We are done with the maximum taxable income that can be taxed at the first piece of $10\%$
We move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the third piece of $22\%$
We move to the fourth piece.
We need to calculate the range of taxable income that should be taxed at the fourth tax rate.
$157500.00 - 82500.00 = 75000.00$
$\$75000.00$ is taxed at $24\%$
Fourth Piece for $\$75000.00$
tax for $\$75000.00$ income @ $24\%$ per $\$$ earned = $75000.00 * 0.24 = 18000.00$
We are done with the maximum taxable income that can be taxed at the fourth piece of $24\%$
We move to the fifth piece.
We need to calculate the range of taxable income that should be taxed at the fifth tax rate.
$200000.00 - 157500.00 = 42500.00$
$\$42500.00$ is taxed at $32\%$
Fifth Piece for $\$42500.00$
tax for $\$42500.00$ income @ $32\%$ per $\$$ earned = $42500.00 * 0.32 = 13600.00$
We are done with the maximum taxable income that can be taxed at the fifth piece of $32\%$
We move to the sixth piece.
$234543.00 - 200000.00 = 34543.00$
The rest of the $\$34543.00$ is taxed at $35\%$
Sixth Piece for $\$34543.00$
tax for $\$34543.00$ income @ $35\%$ per $\$$ earned = $34543.00 * 0.35 = 12090.05$
$952.50 + 3501.00 + 9636.00 + 18000 + 13600 + 12090.05 = 57779.55$
tax for taxable income of
$\$234,543.00$ =
$\$57,779.55$
(7.) $\$700,712.00$ falls in the seventh piece.
Before we use the seventh piece (last piece), we have to go through the previous six pieces in order.
First Piece for $\$9525.00$
$9525.00$ of the $12575.00$ is taxed at $10\%$
tax for $\$9525.00$ income @ $10\%$ per $\$$ earned = $9525.00 * 0.1 = 952.50$
We are done with the maximum taxable income that can be taxed at the first piece of $10\%$
We move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the third piece of $22\%$
We move to the fourth piece.
We need to calculate the range of taxable income that should be taxed at the fourth tax rate.
$157500.00 - 82500.00 = 75000.00$
$\$75000.00$ is taxed at $24\%$
Fourth Piece for $\$75000.00$
tax for $\$75000.00$ income @ $24\%$ per $\$$ earned = $75000.00 * 0.24 = 18000.00$
We are done with the maximum taxable income that can be taxed at the fourth piece of $24\%$
We move to the fifth piece.
We need to calculate the range of taxable income that should be taxed at the fifth tax rate.
$200000.00 - 157500.00 = 42500.00$
$\$42500.00$ is taxed at $32\%$
Fifth Piece for $\$42500.00$
tax for $\$42500.00$ income @ $32\%$ per $\$$ earned = $42500.00 * 0.32 = 13600.00$
We are done with the maximum taxable income that can be taxed at the fifth piece of $32\%$
We move to the sixth piece.
We need to calculate the range of taxable income that should be taxed at the sixth tax rate.
$500000.00 - 200000.00 = 300000.00$
$\$300000.00$ is taxed at $35\%$
Sixth Piece for $\$300000.00$
tax for $\$300000.00$ income @ $35\%$ per $\$$ earned = $300000.00 * 0.35 = 105000.00$
We are done with the maximum taxable income that can be taxed at the sixth piece of $35\%$
We move to the seventh piece.
$700712.00 - 500000.00 = 200712.00$
The rest of the $\$200712.00$ is taxed at $37\%$
Seventh Piece for $\$200712.00$
tax for $\$200712.00$ income @ $37\%$ per $\$$ earned = $200712.00 * 0.37 = 74263.44$
$952.50 + 3501.00 + 9636.00 + 18000 + 13600 + 105000 + 74263.44 = 224952.94$
tax for taxable income of
$\$700,712.00$ =
$\$224,952.94$
Some students may ask if it is possible to have just one function that will calculate the tax for any taxable income.
Or is it possible to find the tax for a taxable income that falls in the second piece, without having to go through the first piece?
Those are really interesting questions!
That is one of the reasons for studying piecewise functions ☺☺☺
Please specify the importance of not rounding intermediate calculations.
Please specify the importance of rounding only the final answer to two decimal place (because it is dollars and cents).
Solution: $2nd$ Method: Piecewise Function/Algebraic Method
What if we have to calculate the taxes for "several" taxable incomes?
Do we have to solve this manually all the time? That will be time consuming!
We can write it as a piecewise function and use each function to calculate the taxes that corresponds to each taxable income.
Besides, writing it as a piecewise function helps us to write a computer program that will calculate the taxes for any amount of taxable income.
Define the variables.
Let $p$ = taxable income (in $\$$)
Let $t$ = taxes (in $\$$)
The taxes paid is a function of the income earned.
Taxes is the dependent variable.
Taxable income is the independent variable.
$t = f(p)$
We can also write is as $t(p)$
This application has
seven pieces.
For the first piece;
tax for $\$p$ income @ $10\%$ per $\$$ earned = $p * 0.1 = 0.1p$
$t(p) = 0.1p$
For the second piece;
We have to "finish" with the first piece first
First Piece for $\$9525.00$
tax for $\$9525$ income @ $10\%$ per $\$$ earned = $9525 * 0.1 = 952.5$
Then, we move to the second piece.
Second Piece for $\$p - 9525.00$
The remaining income, $(p - 9525)$ is taxed at $12\%$
So, we have to multiply the remaining income by $0.12$
$t(p) = 952.5 + 0.12(p - 9525)$
$t(p) = 952.5 + 0.12p - 1143$
$t(p) = 0.12p - 190.5$
For the third piece;
We have to "finish" with the first and second pieces
First Piece for $\$9525.00$
tax for $\$9525$ income @ $10\%$ per $\$$ earned = $9525 * 0.1 = 952.5$
Then, we move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
Please review the scenario in the Manual/Arithmetic Method
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We have to move on to the third piece.
Third Piece for $\$p - 38700.00$
The remaining income, $(p - 38700)$ is taxed at $22\%$
So, we have to multiply the remaining income by $0.22$
$t(p) = 952.5 + 3501 + 0.22(p - 38700)$
$t(p) = 952.5 + 3501 + 0.22p - 8514$
$t(p) = 0.22p - 4060.5$
For the fourth piece;
We have to "finish" with the first, second, and third pieces
First Piece for $\$9525.00$
tax for $\$9525$ income @ $10\%$ per $\$$ earned = $9525 * 0.1 = 952.5$
Then, we move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
Please review the scenario in the Manual/Arithmetic Method
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the second piece of $22\%$
We move to the fourth piece.
Fourth Piece for $\$p - 82500.00$
The remaining income, $(p - 82500)$ is taxed at $24\%$
So, we have to multiply the remaining income by $0.24$
$t(p) = 952.5 + 3501 + + 9636 + 0.24(p - 82500)$
$t(p) = 952.5 + 3501 + 9636 + 0.24p - 19800$
$t(p) = 0.24p - 5710.5$
For the fifth piece;
We have to "finish" with the first, second, third, and fourth pieces
First Piece for $\$9525.00$
tax for $\$9525$ income @ $10\%$ per $\$$ earned = $9525 * 0.1 = 952.5$
Then, we move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
Please review the scenario in the Manual/Arithmetic Method
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the third piece of $22\%$
We move to the fourth piece.
We need to calculate the range of taxable income that should be taxed at the fourth tax rate.
$157500.00 - 82500.00 = 75000.00$
$\$75000.00$ is taxed at $24\%$
Fourth Piece for $\$75000.00$
tax for $\$75000.00$ income @ $24\%$ per $\$$ earned = $75000.00 * 0.24 = 18000.00$
We are done with the maximum taxable income that can be taxed at the fourth piece of $24\%$
We move to the fifth piece.
Fifth Piece for $\$p - 157500.00$
The remaining income, $(p - 157500)$ is taxed at $32\%$
So, we have to multiply the remaining income by $0.32$
$t(p) = 952.5 + 3501 + + 9636 + 18000 + 0.32(p - 157500)$
$t(p) = 952.5 + 3501 + 9636 + 18000 + 0.32p - 50400$
$t(p) = 0.32p - 18310.5$
For the sixth piece;
We have to "finish" with the first, second, third, fourth, and fifth pieces
First Piece for $\$9525.00$
tax for $\$9525$ income @ $10\%$ per $\$$ earned = $9525 * 0.1 = 952.5$
Then, we move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
Please review the scenario in the Manual/Arithmetic Method
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the third piece of $22\%$
We move to the fourth piece.
We need to calculate the range of taxable income that should be taxed at the fourth tax rate.
$157500.00 - 82500.00 = 75000.00$
$\$75000.00$ is taxed at $24\%$
Fourth Piece for $\$75000.00$
tax for $\$75000.00$ income @ $24\%$ per $\$$ earned = $75000.00 * 0.24 = 18000.00$
We are done with the maximum taxable income that can be taxed at the fourth piece of $24\%$
We move to the fifth piece.
We need to calculate the range of taxable income that should be taxed at the fifth tax rate.
$200000.00 - 157500.00 = 42500.00$
$\$42500.00$ is taxed at $32\%$
Fifth Piece for $\$42500.00$
tax for $\$42500.00$ income @ $32\%$ per $\$$ earned = $42500.00 * 0.32 = 13600.00$
We are done with the maximum taxable income that can be taxed at the fifth piece of $32\%$
We move to the sixth piece.
Sixth Piece for $\$p - 200000.00$
The remaining income, $(p - 200000)$ is taxed at $35\%$
So, we have to multiply the remaining income by $0.35$
$t(p) = 952.5 + 3501 + + 9636 + 18000 + 13600 + 0.35(p - 200000)$
$t(p) = 952.5 + 3501 + 9636 + 18000 + 13600 + 0.35p - 70000$
$t(p) = 0.35p - 24310.5$
For the seventh piece;
We have to "finish" with the previous six pieces in order
First Piece for $\$9525.00$
tax for $\$9525$ income @ $10\%$ per $\$$ earned = $9525 * 0.1 = 952.5$
Then, we move to the second piece.
We need to calculate the range of taxable income that should be taxed at the second tax rate.
Please review the scenario in the Manual/Arithmetic Method
$38700.00 - 9525.00 = 29175.00$
$\$29175.00$ is taxed at $12\%$
Second Piece for $\$29175.00$
tax for $\$29175.00$ income @ $12\%$ per $\$$ earned = $29175.00 * 0.12 = 3501.00$
We are done with the maximum taxable income that can be taxed at the second piece of $12\%$
We move to the third piece.
We need to calculate the range of taxable income that should be taxed at the third tax rate.
$82500.00 - 38700.00 = 43800.00$
$\$43800.00$ is taxed at $22\%$
Third Piece for $\$43800.00$
tax for $\$43800.00$ income @ $22\%$ per $\$$ earned = $43800.00 * 0.22 = 9636.00$
We are done with the maximum taxable income that can be taxed at the third piece of $22\%$
We move to the fourth piece.
We need to calculate the range of taxable income that should be taxed at the fourth tax rate.
$157500.00 - 82500.00 = 75000.00$
$\$75000.00$ is taxed at $24\%$
Fourth Piece for $\$75000.00$
tax for $\$75000.00$ income @ $24\%$ per $\$$ earned = $75000.00 * 0.24 = 18000.00$
We are done with the maximum taxable income that can be taxed at the fourth piece of $24\%$
We move to the fifth piece.
We need to calculate the range of taxable income that should be taxed at the fifth tax rate.
$200000.00 - 157500.00 = 42500.00$
$\$42500.00$ is taxed at $32\%$
Fifth Piece for $\$42500.00$
tax for $\$42500.00$ income @ $32\%$ per $\$$ earned = $42500.00 * 0.32 = 13600.00$
We are done with the maximum taxable income that can be taxed at the fifth piece of $32\%$
We move to the sixth piece.
We need to calculate the range of taxable income that should be taxed at the sixth tax rate.
$500000.00 - 200000.00 = 300000.00$
$\$300000.00$ is taxed at $35\%$
Sixth Piece for $\$300000.00$
tax for $\$300000.00$ income @ $35\%$ per $\$$ earned = $300000.00 * 0.35 = 105000.00$
We are done with the maximum taxable income that can be taxed at the sixth piece of $35\%$
We move to the seventh piece.
Seventh Piece for $\$p - 500000.00$
The remaining income, $(p - 500000)$ is taxed at $37\%$
So, we have to multiply the remaining income by $0.37$
$t(p) = 952.5 + 3501 + + 9636 + 18000 + 13600 + 105000 + 0.37(p - 500000)$
$t(p) = 952.5 + 3501 + 9636 + 18000 + 13600 + 105000 + 0.37p - 185000$
$t(p) = 0.37p - 34310.5$
We can now write the piecewise function as:
$$
t(p) =
\begin{cases}
\\[3ex]
0.1p; & \quad 0 \leq p \leq 9525 \\[3ex]
0.12p - 190.5; & \quad 9525 \lt p \leq 38700 \\[3ex]
0.22p - 4060.5; & \quad 38700 \lt p \leq 82500 \\[3ex]
0.24p - 5710.5; & \quad 82500 \lt p \leq 157500 \\[3ex]
0.32p - 18310.5; & \quad 157500 \lt p \leq 200000 \\[3ex]
0.35p - 24310.5; & \quad 200000 \lt p \leq 500000 \\[3ex]
0.37p - 34310.5; & \quad p \gt 500000
\end{cases}
$$
Let us recalculate all the questions using the Piecewise Function method.
(1.) $\$7,000.00$ falls in the first piece.
$
t(p) = 0.1p \\[3ex]
t(7000) = 0.1(7000) \\[3ex]
= 700 \\[3ex]
$
tax for taxable income of
$\$7,000.00$ =
$\$700.00$
(2.) $\$12,575.00$ falls in the second piece.
$
t(p) = 0.12p - 190.5 \\[3ex]
t(12575) = 0.12(12575) - 190.5 \\[3ex]
= 1509 - 190.5 \\[3ex]
= 1318.5 \\[3ex]
$
tax for taxable income of
$\$12,575.00$ =
$\$1,318.50$
(3.) $\$43,750.00$ falls in the third piece.
$
t(p) = 0.22p - 4060.5 \\[3ex]
t(43750) = 0.22(43750) - 4060.5 \\[3ex]
= 9625 - 4060.5 \\[3ex]
= 5564.5 \\[3ex]
$
tax for taxable income of
$\$43,750.00$ =
$\$5,564.50$
(4.) $\$120,327.00$ falls in the fourth piece.
$
t(p) = 0.24p - 5710.5 \\[3ex]
t(120327) = 0.24(120327) - 5710.5 \\[3ex]
= 28878.48 - 5710.5 \\[3ex]
= 23167.98 \\[3ex]
$
tax for taxable income of
$\$120,327.00$ =
$\$23,167.98$
(5.) $\$165,428.00$ falls in the fifth piece.
$
t(p) = 0.32p - 18310.5 \\[3ex]
t(165428) = 0.32(165428) - 18310.5 \\[3ex]
= 52936.96 - 18310.5 \\[3ex]
= 34626.46 \\[3ex]
$
tax for taxable income of
$\$165,428.00$ =
$\$34,626.46$
(6.) $\$234,543.00$ falls in the sixth piece.
$
t(p) = 0.35p - 24310.5 \\[3ex]
t(234543) = 0.35(234543) - 24310.5 \\[3ex]
= 82090.05 - 24310.5 \\[3ex]
= 57779.55 \\[3ex]
$
tax for taxable income of
$\$234,543.00$ =
$\$57,779.55$
(7.) $\$700,712.00$ falls in the seventh piece.
$
t(p) = 0.37p - 34310.5 \\[3ex]
t(700712) = 0.37(700712) - 34310.5 \\[3ex]
= 259263.44 - 34310.5 \\[3ex]
= 224952.94 \\[3ex]
$
tax for taxable income of
$\$700,712.00$ =
$\$224,952.94$
Ask students their preferred method - solving it manually or solving it by piecewise function.
They should give reasons for their answers.
Ask students if any of them can come up with another method besides the two methods already discussed.
Before we develop the calculator for the 2018 Federal Income Tax, we need to write the Piecewise Functions for
the other filing options.
We can ask the user to select any of the filing options to calculate the tax.
If you follow the example for the Single filing option, you should get the same results that I get.
Please verify your results with my own. If you find any discrepancy even by one cent, please let me know.
The Piecewise Function for the Head of Household is:
$$
t(p) =
\begin{cases}
\\[3ex]
0.1p; & \quad 0 \leq p \leq 13600 \\[3ex]
0.12p - 272; & \quad 13600 \lt p \leq 51800 \\[3ex]
0.22p - 5452; & \quad 51800 \lt p \leq 82500 \\[3ex]
0.24p - 7102; & \quad 82500 \lt p \leq 157500 \\[3ex]
0.32p - 19702; & \quad 157500 \lt p \leq 200000 \\[3ex]
0.35p - 25702; & \quad 200000 \lt p \leq 500000 \\[3ex]
0.37p - 35702; & \quad p \gt 500000
\end{cases}
$$
The Piecewise Function for the Married Filing Jointly or Qualifying Widow is:
$$
t(p) =
\begin{cases}
\\[3ex]
0.1p; & \quad 0 \leq p \leq 19050 \\[3ex]
0.12p - 381; & \quad 19050 \lt p \leq 77400 \\[3ex]
0.22p - 8121; & \quad 77400 \lt p \leq 165000 \\[3ex]
0.24p - 11421; & \quad 165000 \lt p \leq 315000 \\[3ex]
0.32p - 36621; & \quad 315000 \lt p \leq 400000 \\[3ex]
0.35p - 48621; & \quad 400000 \lt p \leq 600000 \\[3ex]
0.37p - 60621; & \quad p \gt 600000
\end{cases}
$$
The Piecewise Function for the Married Filing Separately is:
$$
t(p) =
\begin{cases}
\\[3ex]
0.1p; & \quad 0 \leq p \leq 9525 \\[3ex]
0.12p - 190.5; & \quad 9525 \lt p \leq 38700 \\[3ex]
0.22p - 4060.5; & \quad 38700 \lt p \leq 82500 \\[3ex]
0.24p - 5710.5; & \quad 82500 \lt p \leq 157000 \\[3ex]
0.32p - 18270.5; & \quad 157000 \lt p \leq 200000 \\[3ex]
0.35p - 24270.5; & \quad 200000 \lt p \leq 300000 \\[3ex]
0.37p - 30270.5; & \quad p \gt 300000
\end{cases}
$$
Which of the two methods do you prefer?
What are your reasons?
What are the pros and cons that you see for each method?
Do you have any other method for solving Piecewise Function applications?
Yearly Tax Statement for $2018$
Please test the calculator and see the output.
Complete all fields. Then, click "Tax Statement".
Income Taxes
Please review the example calculations and test the calculator before you begin.
For Information Technology/Computer Science Students: Midterm Project
Minimum Requirements for Beginning C++, Python
These are the minimum requirements.
Please be creative.
I understand I did all the four filing options for the $2018$ Federal Income Tax.
However, you are only required to do a minimum of one option.
You may choose to do all options if you prefer.
(1.) Please use appropriate naming for your project application.
The application should display at least the same output of my calculator.
That implies that you should test my calculator to see the output.
Your application may include more information.
(2.) The application should be a console application.
(3.) The Input/Output feature should be used.
Error Handling
(4.) Alert the user/Display an appropriate error message to the user, if the taxable income is negative.
(5.) Make sure your executable file runs by itself outside the project folder
If it does run, include all these: (documentation of all your Math work and the .exe file)
in OneDrive, create a
shareable link, and post the link in the Midterm Project Drafts forum of the course on Blackboard or send to me
via email.
You may also upload them directly if you prefer.
I shall review and provide feedback.
If your submission works well, I shall ask you to submit the Project folder.
The Project folder is the folder that is created when you create a
new project.
When you submit it, I shall review and provide feedback.
If it does not run, then you need to fix it.
If you cannot fix it and you have reviewed the resources, please attend the Office Hours/Live Sessions so I can
help you.
(6.) When you are done (everything works well), please zip
the entire project: (documentation of the Math, executable file that runs by itself outside the Project folder,
and the Project folder) into one folder; and submit the zipped folder (.zip only) in the actual Midterm Project
forum of the Blackboard course.
Minimum Requirements for Beginning VB.NET, Beginning C#, Beginning Java, Python
These are the minimum requirements.
Please be creative.
I understand I did all the four filing options for the $2018$ Federal Income Tax.
However, you are only required to do a minimum of one option.
You may choose to do all options if you prefer.
(1.) Please use appropriate naming for your project application.
The application should display at least the same output of my calculator.
That implies that you should test my calculator to see the output.
Your application may include more information.
(2.) The application should be a desktop application.
(3.) Set the MinimumBox property of the form to True
We want to accommodate users with laptop/desktop smaller screen sizes too.
They should have the ability to adjust your application to fit their screen sizes.
(4.) The Input/Output feature should be used.
Error Handling
(5.) Alert the user/Display an appropriate error message to the user, if the taxable income is negative.
(6.) Make sure your executable file runs by itself outside the project folder
If it does run, include all these: (documentation of all your Math work and the .exe file)
in OneDrive, create a
shareable link, and post the link in the Midterm Project Drafts forum of the course on Blackboard or send to me
via email.
You may also upload them directly if you prefer.
I shall review and provide feedback.
If your submission works well, I shall ask you to submit the Project folder.
The Project folder is the folder that is created when you create a
new project.
When you submit it, I shall review and provide feedback.
If it does not run, then you need to fix it.
If you cannot fix it and you have reviewed the resources, please attend the Office Hours/Live Sessions so I can
help you.
(7.) When you are done (everything works well), please zip
the entire project: (documentation of the Math, executable file that runs by itself outside the Project folder,
and the Project folder) into one folder; and submit the zipped folder (.zip only) in the actual Midterm Project
forum of the Blackboard course.
Minimum Requirements for Advanced C++
These are the minimum requirements. Please be creative.
(1.) Please use appropriate naming for your project application.
The application should display at least the same output of my calculator.
That implies that you should test my calculator to see the output.
Your application may include more information on the output.
(2.) The application should be a console application.
(3.) Input/Output feature should be used.
(4.) Class should be used.
(5.) Constructor(s) should be used.
(6.) Property/Properties should be used.
The class member: Taxable Income should be private.
(7.) Method(s) should be used.
Error Handling
(8.) Alert the user/Display an appropriate error message to the user, if the taxable income is negative.
(9.) Make sure your executable file runs by itself outside the project folder
If it does run, include all these: (documentation of all your Math work and the .exe file)
in OneDrive, create a
shareable link, and post the link in the Midterm Project Drafts forum of the course on Blackboard or send to me
via email.
You may also upload them directly if you prefer.
I shall review and provide feedback.
If your submission works well, I shall ask you to submit the Project folder.
The Project folder is the folder that is created when you create a
new project.
When you submit it, I shall review and provide feedback.
If it does not run, then you need to fix it.
If you cannot fix it and you have reviewed the resources, please attend the Office Hours/Live Sessions so I can
help you.
(10.) When you are done (everything works well), please zip
the entire project: (documentation of the Math, executable file that runs by itself outside the Project folder,
and the Project folder) into one folder; and submit the zipped folder (.zip only) in the actual Midterm Project
forum of the Blackboard course.
Minimum Requirements for Advanced VB.NET, Advanced C#, Advanced Java
These are the minimum requirements. Please be creative.
(1.) Please use appropriate naming for your project application.
The application should display at least the same output of my calculator.
That implies that you should test my calculator to see the output.
Your application may include more information on the output.
(2.) The application should be a desktop application.
(3.) Set the MinimumBox property of the form to True
We want to accommodate users with laptop/desktop smaller screen sizes too.
They should have the ability to adjust your application to fit their screen sizes.
(4.) Input/Output feature should be used.
(5.) Class should be used.
(6.) Constructor(s) should be used.
(7.) Property/Properties should be used.
The class member: Taxable Income should be private.
(8.) Method(s) should be used.
Error Handling
(9.) Alert the user/Display an appropriate error message to the user, if the taxable income is negative.
(10.) Make sure your executable file runs by itself outside the project folder
If it does run, include all these: (documentation of all your Math work and the .exe file)
in OneDrive, create a
shareable link, and post the link in the Midterm Project Drafts forum of the course on Blackboard or send to me
via email.
You may also upload them directly if you prefer.
I shall review and provide feedback.
If your submission works well, I shall ask you to submit the Project folder.
The Project folder is the folder that is created when you create a
new project.
When you submit it, I shall review and provide feedback.
If it does not run, then you need to fix it.
If you cannot fix it and you have reviewed the resources, please attend the Office Hours/Live Sessions so I can help you.
When you are done (everything works well), please zip
the entire project: (documentation of the Math, executable file that runs by itself outside the Project folder,
and the Project folder) into one folder; and submit the zipped folder (.zip only) in the actual Midterm Project forum of the Blackboard course.
Minimum Requirements for ASP.NET
These are the minimum requirements. Please be creative.
(1.) Please use appropriate naming for your project application.
The application should display at least the same output of my calculator.
That implies that you should test my calculator to see the output.
Your application may include more information.
(2.) The application should be a web application.
You may use Functional Programming or Object-oriented Programming.
You may use ASP.NET Web Forms, ASP.NET Web Pages, ASP.NET MVC, or any other ASP.NET web platform.
You may use C# or VB.NET
(3.) The Input/Output feature should be used.
Use nice HTML elements and CSS.
Functionality is the most important factor.
However, aesthetics and user-friendliness are also important factors in Web Design.
Error Handling
(4.) Alert the user/Display an appropriate error message to the user, if the taxable income is negative.
(5.) Include the URL of the web application (web address) in the documentation of your Math work.
Please make sure the web application is accessible.
The draft project should contain: documentation of Math work, the web application address, and the Project
folder.
The Project folder is the folder that is created when you create a new project. It contains all folders and
files.
Include all these in OneDrive, create a shareable link, and post the link in the Midterm Project Drafts forum of
the
course on Blackboard or send to me via email.
I shall review and provide feedback.
(6.) When you are done (everything works well), please zip
the entire project: (documentation of the Math that includes the URL, and the Project folder) into one folder;
and submit the zipped folder (.zip only) in the actual Midterm Project forum of the Blackboard course.
Minimum Requirements for JavaScript
These are the minimum requirements. Please be creative.
(1.) Please use appropriate naming for your project application.
The application should display at least the same output of my calculator.
That implies that you should test my calculator to see the output.
Your application may include more information.
(2.) The application should be a web application.
(3.) The Input/Output feature should be used.
Use nice HTML elements and CSS.
Functionality is the most important factor.
However, aesthetics and user-friendliness are also important factors in Web Design.
Error Handling
(4.) Alert the user/Display an appropriate error message to the user, if the taxable income is negative.
(5.) Include the URL of the web application (web address) in the documentation of your Math work.
Please make sure the web application is accessible.
Ensure that you follow the best practices: link to the external CSS file in the head element and the link to the
external
JS file right before the closing body element.
The draft project should contain: documentation of Math work that includes the URL.
Include the draft project in OneDrive, create a shareable link, and post the link in the Midterm Project Drafts
forum of the
course on Blackboard or send to me via email.
I shall review and provide feedback.
(6.) When you are done (everything works well), please submit the entire project:
(documentation of the Math that includes the URL) in the actual Midterm Project forum of the
Blackboard course.
Optional
Further Work
Writing Skills: Submit a Reflection Journal.
Include your challenges, and how you overcame those challenges.
Technology Skills:
Include penalties for late payments in your project.
Write a mobile application for the project.
Develop a mobile application that sends reminders to residents/citizens to file their taxes on time.