For this assignment, each student will write a program to estimate federal tax obligations and effective tax rate.
The United States Internal Revenue Service collects taxes from those who earn income in the United States. Ignoring all tax deductions and loopholes, those who earn more are require to contribute a higher percentage of their income. The following table shows the tax brackets for 2019.
|Rate||Single Filers||Married Joint Filers|
|10%||$0 to $9,700||$0 to $19,400|
|12%||$9,701 to $39,475||$19,401 to $78,950|
|22%||$39,476 to $84,200||$78,951 to $168,400|
|24%||$84,201 to $160,725||$168,401 to $321,450|
|32%||$160,726 to $204,100||$321,451 to $408,200|
|35%||$204,101 to $510,300||$408,201 to $612,350|
Note that the first $9,700 of all single filers income is taxed at the 10% rate, the next $29,775 (= 39,475 - 9,700) is taxed at 12%, etc... For example, taxes due for a single filer with $66,480 in income would be $10,484.10, which is calculated as follows: 0.10 x 9700 + 0.12 x 29775 + 0.22 x 27005. Note: tax obligations are rounded to the nearest whole dollar.
The effective tax rate is calculated as the amount of taxes due divided by the total income. In our specific example this would be 15.77% = 100% x ($10484.10/$66480).
Write a program that asks the user if they are a single filer or married joint filer. It should then ask for their expected earned income for 2019 and display the estimated taxes they will be required to pay by April 15, 2020 as well as their effective tax rate.
You may develop your own technique for determining if the user is a single or married joint filer, but it must be obvious to the user when the program is run (provide clear instructions).
Your program must be in a class called
CalculateTaxes in a package that matches your
MSOE username (email address without the @msoe.edu).
A sample program interaction for the program is shown below:
Are you a single filer or a married joint filer (enter 's' or 'j'): s Enter an estimate of your earned income for 2019: 66480.00 Your estimated taxes for 2019 are: $10484.10 This results in an 15.77% effective tax rate.
Note: You do not need to have the correct number of digits after the decimal places.
This laboratory assignment was developed by Dr. Chris Taylor.