Question

Tax Calculator (conditional flow control)

MATLAB

Tax Calculator (conditional flow control) 0 solutions submitted (max: Unlimited) The simplest income tax calculation for a siYour Function C Reset MATLAB Documentation 1 function [totalTax, effectiveTaxRate] incomeTax(Income) 2 %Write the commands fo

Tax Calculator (conditional flow control) 0 solutions submitted (max: Unlimited) 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メ300 and the personal exemption was >44Mn, The 2015 tax rates vary by income bracket and are given in he table below Tax Rate Income Range 10% 0.01-S9,225.00 15% 9,225.01-$37,450.00 25% $37,450.01-90,750.00 28% $90,750.01-$189,300.00 189,300.01-411,500.00 33% $411,500.01-$413,200.00 35% 39.6% Over $413,200 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 h31 ују US median income in 2014 you first apply the standard UU deduction and the b4, Ulu exemption o get a axable income o 53·yjy t UU 4UUU 341, byy Then o compute he ax liability you have You can calculate an "effective tax rate" based on the original income as ettective lixKate =り2US.yu ÷ 1リ5リ= U. I 1リ or 11.9% Code has already been provided to define a function called incomeTax that accepts an input variable named income that is a number. Add code that implements the procedure 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.
Your Function C Reset MATLAB Documentation 1 function [totalTax, effectiveTaxRate] incomeTax(Income) 2 %Write the commands for your function here Code to call your function C Reset 1 (totalTax1, effectiveTaxRatel] incomeTax (15000) 2 [totalTax2, effectiveTaxRate2] = IncomeTax(44008) Code to execute the function when you click Run Run Function
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

function [totalTax,effectiveTaxRate]=incomeTax(Income)
totalTax=0;
in=Income;
Income=Income-6300-4000;
if(Income<=9225)
totalTax=0.1*Income;
elseif(Income<=37450)
totalTax=0.1*9225.0+0.15*(Income-9225);
elseif(Income<=90750)
totalTax=0.1*9225.0+0.15*(37450-9225)+0.25*(Income-37450);
elseif(Income<=189300)
totalTax=0.1*9225.0+0.15*(37450-9225)+0.25*(90750-37450)+0.28*(Income-90750);
elseif(Income<=411500)
totalTax=0.1*9225.0+0.15*(37450-9225)+0.25*(90750-37450)+0.28*(189300-90750)+0.33*(Income-189300);
elseif(Income<=413200)
totalTax=0.1*9225.0+0.15*(37450-9225)+0.25*(90750-37450)+0.28*(189300-90750)+0.33*(411500-189300)+0.35*(Income-411500);
else
totalTax=0.1*9225.0+0.15*(37450-9225)+0.25*(90750-37450)+0.28*(189300-90750)+0.33*(411500-189300)+0.35*(413200-411500)+0.396*(Income-413200);
end
totalTax=totalTax
effectiveTaxRate=totalTax/in;
end

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Tax Calculator (conditional flow control) MATLAB Tax Calculator (conditional flow control) 0 solutions submitted (max: Unlimited) The simplest income tax calculation for a single person filing federa...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT