Using Excel to calculate income tax

ExcelBeginner34

New Member
Joined
Mar 2, 2019
Messages
41
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I am trying to use Excel to calculate income tax. The tax system has a number of rates applied to each band as follows

Lower Limit (H22) Upper Limited (I22) Rate (J22)
Tax Free Allowance (G23) £0 £12,500 0%
Starter Rate (G24) £12,500 £14,549 19%
Basic Rate (G25) £14,549 £24,999 20%
Intermediate Rate (G26) £24,999 £43,430 21%
Higher Rate (G27) £43,430 £150,000 41%
Top Rate (G28) £150,000 £250,000 46%

So if the Salary was £40,000 before tax:

  • The first £12,500 is tax free
  • The next £2,049 (14,549 - 12,500) is taxed at 19%
  • The next £10,450 (24,999 - 14549) is taxed at 20%
  • and so on until you reach the total salary.

I am trying to calculate each bracket i.e £2,049*0.19 = 389.31 in a separate cell

  • Starter Rate E22
  • Basic Rate E23
  • Intermediate Rate E24
  • Higher Rate E25
  • I don't need the top rate as salary is unlikely to ever go above £150k.

The taxable income i.e gross salary less tax free allowance of £12,500 is currently in cell E20. So for example at £40k this would be £27,500.

I have tried using the IF function but I am just a beginner and not having much luck. Any help would be much appreciated.

Many thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,
maybe a UDF like the below can help you.

Code:
Function IncomeTax(ByVal dblIncome As Double) As Double
    Dim Tax01 As Double
    Dim Tax02 As Double
    Dim Tax03 As Double
    Dim Tax04 As Double
    Dim Tax05 As Double
    
    Select Case dblIncome
        
        Case 0 To 12500
            IncomeTax = (dblIncome / 100) * 0
        Case 12500 To 14549
            Tax01 = dblIncome - 12500
            IncomeTax = (Tax01 / 100) * 19
        Case 14550 To 24999
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            IncomeTax = Tax01 + Tax02
        Case 25000 To 43430
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            Tax03 = (43430 - 25000) / 100 * 21
            IncomeTax = Tax01 + Tax02 + Tax03
        Case 43431 To 150000
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            Tax03 = (43430 - 25000) / 100 * 21
            Tax04 = (150000 - 43430) / 100 * 41
            IncomeTax = Tax01 + Tax02 + Tax03 + Tax04
        Case 150001 To 250000
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            Tax03 = (43430 - 25000) / 100 * 21
            Tax04 = (150000 - 43430) / 100 * 41
            Tax05 = (dblIncome - 150000) / 100 * 46
            IncomeTax = Tax01 + Tax02 + Tax03 + Tax04 + Tax05
        Case Else
        
        End Select
        
End Function

you need to check if the rates are correct in the function but something down those lines could get you started.
I guess you only like the result rahter then all the necessary steps.

HTH
 
Upvote 0
Hi,
maybe a UDF like the below can help you.

Code:
Function IncomeTax(ByVal dblIncome As Double) As Double
    Dim Tax01 As Double
    Dim Tax02 As Double
    Dim Tax03 As Double
    Dim Tax04 As Double
    Dim Tax05 As Double
    
    Select Case dblIncome
        
        Case 0 To 12500
            IncomeTax = (dblIncome / 100) * 0
        Case 12500 To 14549
            Tax01 = dblIncome - 12500
            IncomeTax = (Tax01 / 100) * 19
        Case 14550 To 24999
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            IncomeTax = Tax01 + Tax02
        Case 25000 To 43430
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            Tax03 = (43430 - 25000) / 100 * 21
            IncomeTax = Tax01 + Tax02 + Tax03
        Case 43431 To 150000
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            Tax03 = (43430 - 25000) / 100 * 21
            Tax04 = (150000 - 43430) / 100 * 41
            IncomeTax = Tax01 + Tax02 + Tax03 + Tax04
        Case 150001 To 250000
            Tax01 = (14549 - 12500) / 100 * 19
            Tax02 = (24999 - 14550) / 100 * 20
            Tax03 = (43430 - 25000) / 100 * 21
            Tax04 = (150000 - 43430) / 100 * 41
            Tax05 = (dblIncome - 150000) / 100 * 46
            IncomeTax = Tax01 + Tax02 + Tax03 + Tax04 + Tax05
        Case Else
        
        End Select
        
End Function

you need to check if the rates are correct in the function but something down those lines could get you started.
I guess you only like the result rahter then all the necessary steps.


Thanks I'll give this a try.
 
Upvote 0
The first £12,500 is tax freeBasic Rate (G25) £14,549 £24,999 20%
The next £2,049 (14,549 - 12,500) is taxed at 19%Intermediate Rate (G26) £24,999 £43,430 21%
The next £10,450 (24,999 - 14549) is taxed at 20%Higher Rate (G27) £43,430 £150,000 41%
and so on until you reach the total salary.Top Rate (G28) £150,000 £250,000 46%
M Y T A B L E
0maxcum max
00-175001250012500000
00-1545120491454919389.31389.31
00-500110450249992020902479.31
11134301843143430213870.516349.82
011200001065701500004143693.750043.52
let salary be30000current band tax1050.21
3529.52
obtained by
=VLOOKUP($D$22,mytable,5)+$J$22

<colgroup><col><col><col><col span="10"></colgroup><tbody>
</tbody>
 
Upvote 0
Please check
- brackets
- rates
- calculation with "allowance"

A variety of solutions for your consideration


Excel 2010
ABCDEFGH
1Amount40,000.00BracketsRateRate_DiffIncome Tax
2Fee5,629.5000%0%00
35,629.5012,50019%19%389.50389.50
45,629.5014,55020%1%2,090.002,479.50
55,629.5025,00021%1%3,150.005,629.50
643,43041%20%0.005,629.50
7150,00046%5%0.00
1dd
Cell Formulas
RangeFormula
F2=E2-N(E1)
G3=MAX(0,MIN($B$1-D3,D4-D3)*E3)
H3=H2+G3
B2=SUMPRODUCT(--(B1>D2:D7),B1-D2:D7,F2:F7)
B3=SUMPRODUCT(--(B1>Brackets),B1-Brackets,Rate_Diff)
B4=(B1>D3)*(B1-D3)*F3+(B1>D4)*(B1-D4)*F4+(B1>D5)*(B1-D5)*F5+(B1>D6)*(B1-D6)*F6+(B1>D7)*(B1-D7)*F7
B5=Incometax(B1)
Named Ranges
NameRefers ToCells
Brackets='1dd'!$D$2:$D$7
Rate_Diff='1dd'!$F$2:$F$7
 
Upvote 0
Thanks - I have set the table out as shown, however, in B3 and B5 I am just getting #ref and #name . I think this is to do with the use of Brackets and Rate Diff in the formula. I have set up the defined names (I think!) but where do I put the 1 dd? When I set up the defined names it looked like excel was trying to get me to open a file but I am not sure what I am supposed to do here. Any thoughts? Sorry as the name suggests this is all very new to me.
Thanks
 
Last edited:
Upvote 0
Hi again - I have made some progress and now only have the #NAME showing in cell B5. NOt sure where to go from here?
 
Upvote 0
Do you still have the UDF silentwolf provided in the file?
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top