Question: Tax Calculator ( conditional flow control ) The simplest income tax calculation for a single person filing federal income taxes in the United States involves

Tax Calculator (conditional flow control)
The simplest income tax calculation for a single person filing federal income taxes in the United States involves applying a standard deduction, personal exemption and marginal
tax rates to the annual income of the taxpayer. For tax year 2015, the standard deduction for an individual was $6300 and the personal exemption was $4000. The 2015 tax rates
vary by income bracket and are given in the table below.
To compute the tax liability on a given income, first the deduction and exemption amounts are subtracted, then each portion of the income is taxed at the marginal rate according
to the table. For example, for an income of $51,939(US median income in 2014) you first apply the standard $6,300 deduction and the $4,000 exemption to get a taxable
income of $51,939-$6,300-$4000=$41,639. Then to compute the tax liability you have:
totalTax =0.19225+0.15(37540-9225)+0.25(41639-37540)=$6203.50
You can calculate an "effective tax rate" based on the original income as
effectiveTaxRate =6203.5051939=0.119
or 11.9%. described above to compute the total tax liability and assign the result to the output variable totalTax. Also compute the effective tax rate and assign this value (decimal value,
not percent) to the effectiveTaxRate output variable.
Note the value of the variable income is defined as an input to the function. Do not overwrite this value in your code. Be sure to assign a value to each of the output variables.
function [totalTax, effectiveTaxRate]= incomeTax(Income)
%Write the commands for your function here.
Tax Calculator ( conditional flow control ) The

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mechanical Engineering Questions!