Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the U . S . , all earned income is subject to federal income tax. The tax system is divided into brackets so that

In the U.S., all earned income is subject to federal income tax. The tax system is divided into
brackets so that higher earners pay a higher percentage of their income in tax. For the 2023
tax year (which is what youre filing taxes for in Spring 2024), the brackets are set up like this
for a single filer:
Income Tax Rate
Up to $11,00010%
Over $11,000, up to $44,72512%
Over $44,725, up to $95,37522%
Over $95,375, up to $182,10024%
Over $182,100, up to $231,25032%
Over $231,250, up to $578,12535%
Over $578,12537%
A common misconception is that if youre near the border between two brackets, its advan-
tageous to refuse a small raise because you would end up with less after-tax pay if you get
bumped into the next higher bracket. This is totally false. The tax rates in the table above are
marginal, which means they apply only to the portions of income in each range, rather than
all of the income.
Thus, earning more income will generally result in more after-tax pay. There are some excep-
tions, such as an income increase disqualifying a taxpayer for the Earned Income Tax Credit1,
but we wont consider those special cases here.
1If youre interested in U.S. tax laws, see https://www.irs.gov/credits-deductions/individuals/
earned-income-tax-credit for more info about the EITC. Its good bedtime reading.
Page 2 of 5
Note that federal tax is not the only thing withheld from your paycheck. There are also deduc-
tions for Social Security and Medicare (known as FICA taxes), state income tax (thankfully
zero if you live in Tennessee), retirement contributions, insurance premiums, and so on. But
for this problem, well focus on just the federal tax.
Here are two examples of how the federal tax is computed.
Alice earns $100,000 as a software engineer. Her income can be broken down into four
parts:
The first $11,000 incurs 10% of tax: $11,000\times 0.1= $1,100
The part between $11,000 and $44,725 incurs 12% of tax: ($44,725- $11,000)\times 0.12
= $4,047
The part between $44,725 and $95,375 incurs 22% of tax: ($95,375- $44,725)\times 0.22
= $11,143
Finally, the part over $95,375 incurs 24% of tax: ($100,000- $95,375)\times 0.24= $1,110
Alices total tax owed is thus $1,100+ $4,047+ $11,143+ $1,110= $17,400. Her effective
tax rate is $17,400/$100,000 or 17.4%.
Bob earns $44,725 as a sloth trainer. His income can be broken down into two parts:
The first $11,000 incurs 10% of tax: $11,000\times 0.1= $1,100
The part between $11,000 and $44,725 incurs 12% of tax: ($44,725- $11,000)\times 0.12
= $4,047
Bobs total tax owed is thus $1,100+ $4,047= $5,147. His effective tax rate is $5,147/$44,725
or about 11.5%.
Your task in this problem is to write a program that computes the federal tax owed for any
salary. After youre done, maybe you can start your own company to compete with H&R Block!
(b)(12 points) Write a program named tax calculator.py that reads user input for 2023
income earned and computes the tax owed and effective tax rate. Assume the user enters
a valid income. The program also provides a bracket-by-bracket breakdown of how the tax
owed was computed. Round off all monetary amounts to two decimal places, and round
off the effective tax rate to one decimal place. Verify that your program works correctly
using the earlier examples, as well as your own test cases.
Page 3 of 5
Example program run (underlined parts indicate what the user enters)
What was your 2023 income? 100000
First $ 11000: $ 1100.00
$ 11000- $ 44725: $ 4047.00
$ 44725- $ 95375: $ 11143.00
$ 95375- $182100: $ 1110.00
Total tax owed: $ 17400.00
Effective tax rate: 17.4%
Make sure code is run in python and do not use the break command and please use conditionals!!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago

Question

What is database?

Answered: 1 week ago

Question

What are Mergers ?

Answered: 1 week ago