Calculating income tax in reverse

Aqusmacro

New Member
Joined
Jan 8, 2024
Messages
46
Office Version
  1. 2013
Platform
  1. Windows
Hi hopefully someone can help me out, been on this all weekend.

I am trying other ways to do a reverse income tax calculation. I was almost there but can’t figure out the last part.

I column D if I enter the value of $70k it calculates to a net income of $585K. If I enter $585 in D16 it calculates to the original amount of $70K, so calculates well. So far great.

In column C If I enter 70K and apply the Refundable abatement and personal deductions It gives me $62347.23. If enter this amount in C16 I need to get to the original $70k but getting $70809. What do I need to modify so it calculates all in reverse?

The parts in green I don’t need just using to test my yellow calculations.

Thanks

880340-progressive-tax-calculation-formula-in-reverse.xlsx
ABCDEFGH
1
2
3
4CalculateNet from Gross
5
6Amount$ 70,000.0070000Tax Rates
7Tax1141511415FromTORateBase
8Net5858558585000.0%0
9Refundable quebec abatement$ 1,512.2315335915.0%0
10Personal deductions:$ 2,250.005336010671720.5%8004
11$ 7,652.7810671823567526.0%18942
12$ 62,347.23
13
14Calculate Gross from Net after Tax
15
16Net62347.2358585.00Net to Taxable
17Tax1238511415FromTORateBase
18Gross74732.2370000000%0
19Refundable quebec abatement$ 1,672.2814535515.0%0
20Personal deductions:$ 2,250.00453568777520.5%8004
21$ 8,462.738777623567526.0%18942
22Gross$ 70,809.96
23
24Refundable quebec abatement$ 1,672.28
25Personal deductions:$ 2,250.00
26
27
28Federal Tax (Quebec residents)
29Quebec abatement (% of federal tax)16.50%
30Present-day Federal basic personal deduction:$ 15,000.00
31Federal base rate15.00%
Sheet1
Cell Formulas
RangeFormula
D6D6=C6
D7D7=ROUND((D6-LOOKUP(D6,E8:E12,E8:E12))*LOOKUP(D6,E8:E12,G8:G12)+LOOKUP(D6,E8:F12,H8:H12),0)
C8:D8D8=D6-D7
E9:E11,E19:E21E9=F8+1
H9:H11H9=ROUND((F8-E8)*(G8),0)+H8
C7C7=ROUND((C6-LOOKUP(C6,E8:E12,E8:E12))*LOOKUP(C6,E8:E12,G8:G12)+LOOKUP(C6,E8:E12,H8:H12),0)
C9C9=((C7-C10)*B29)
C10,C20C10=($B$30*$B$31)
C11,C21C11=C7-C9-C10
C12C12=C6-C11
D17D17=ROUND((D16-LOOKUP(D16,E18:E22,E18:E22))*LOOKUP(D16,E18:E22,G18:G22)/(1-LOOKUP(D16,E18:E22,G18:G22))+LOOKUP(D16,E18:E22,H18:H22),0)
C18:D18D18=D16+D17
E18:H18,G19:H21E18=E8
F19:F21F19=F9-H10
C17C17=ROUND((C16-LOOKUP(C16,E18:E22,E18:E22))*LOOKUP(C16,E18:E22,G18:G22)/(1-LOOKUP(C16,E18:E22,G18:G22))+LOOKUP(C16,E18:E22,H18:H22),0)
C19C19=((C17-B25)*B29)
C22C22=C16+C21
B24B24=((C17-B25)*B29)
B25B25=(B30*B31)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Please check your tax calculation.
Income Tax Cdn.xlsx
ABCDEF
1
2
3CanadaTax Rates
4CalculateNet from GrossBracketsRates
5
6Amount70,000.00015.0%
7CA Tax net9,165.2653,35920.5%
8Net60,834.75106,71726.0%
9Refundable quebec abatement1512.27165,43029.0%
10235,67533.0%
117,652.99
1262,347.01
Sheet2
Cell Formulas
RangeFormula
C7C7=CA_Tax23(E6:F10,C6,B30)
C8C8=C6-C7
C9C9=C7*B29
C11C11=C7-C9
C12C12=C6-C11
Lambda Functions
NameFormula
CA_Tax23=LAMBDA(rngRateData,TaxableIncome,TaxCredits,LET(rng,rngRateData,s,TaxableIncome,cr,TaxCredits,b,CHOOSECOLS(rng,1),r,CHOOSECOLS(rng,2),ro,VSTACK(0,DROP(r,-1)),SUM((s>b)*(s-b)*(r-ro))-cr*0.15))



Income Tax Cdn.xlsx
BC
16Net62,347.01
17Tax9,165.26
18Gross
19Refundable quebec abatement-1,512.27
20
21
22Gross70,000.00
Sheet2
Cell Formulas
RangeFormula
C17C17=C7
C22C22=SUM(C16:C20)
 
Last edited:
Upvote 0
Thanks but I was probably not clear. I need the opposite. Input net and get the gross. My gross to net is working.
 
Upvote 0
Not sure what I am doing wrong. First time I use Lamba functions. I read-up and created a name but getting errors.
Also I see from your sheet from net to gross you are referencing values in the top part of the gross to net. That can not work because I do not know those values unless I put the gross value which I don't know. Where I am having trouble is the Que abatement.

Book1
ABCDEFGHIJKL
1
2
3CanadaTax Rates
4CalculateNet from GrossBracketsRatesCA_Tax23#CALC!
5
6Amount70000015.0%
7CA Tax net#REF!5335920.5%
8Net#REF!10671726.0%
9Refundable quebec abatement#REF!16543029.0%
1023567533.0%
11#REF!
12#REF!
13
14
15
16Net62347.01
17Tax#REF!
18Gross
19Refundable quebec abatement-1512.27
20
21
22Gross#REF!
23
24Refundable quebec abatement#REF!
25Personal deductions:$ 2,250.00
26
27
28
2916.50%
30$ 15,000.00
3115.00%
Sheet1
Cell Formulas
RangeFormula
L4L4=LAMBDA(rngRateData,TaxableIncome,TaxCredits,LET(rng,rngRateData,s,TaxableIncome,cr,TaxCredits,b,CHOOSECOLS(rng,1),r,CHOOSECOLS(rng,2),ro,VSTACK(0,DROP(r,-1)),SUM((s>b)*(s-b)*(r-ro))-cr*0.15))
C7C7=CA_Tax23(E6:F10,C6,B30)
C8C8=C6-C7
C9C9=C7*B29
C11C11=C7-C9
C12C12=C6-C11
C17C17=C7
C22C22=SUM(C16:C20)
B24B24=((C17-B25)*B29)
B25B25=(B30*B31)
Named Ranges
NameRefers ToCells
CA_Tax23=Sheet1!$L$4C7
 
Upvote 0
Lambda requires Excel 365.

To calculate gross from net, try Goal Seek.

I started with with a base calculation income of 50000
I used goal seek and specified the required amount net and Goal Seek changing the gross number

Initial
Income Tax Cdn.xlsx
IJ
9Gross50,000.00
10Federal5,250.00
11Quebec ref16.5%
12Quebec ref866.25
13Net45,616.25
Sheet2
Cell Formulas
RangeFormula
J10J10=SUM((J9>{0;53359;106717;165430;235675})*(J9-{0;53359;106717;165430;235675})*({0.15;0.055;0.055;0.03;0.04}))-B33*0.15
J12J12=J10*J11
J13J13=J9-J10+J12


Income Tax Cdn.xlsx
IJK
8or
9Gross70,000.0070000.00
10Federal9,165.259165.25
11Quebec ref16.5%16.5%
12Quebec ref1512.271512.27
13Net62,347.0162,347.01
14
Sheet2
Cell Formulas
RangeFormula
J10J10=SUM((J9>{0;53359;106717;165430;235675})*(J9-{0;53359;106717;165430;235675})*({0.15;0.055;0.055;0.03;0.04}))-B33*0.15
K10K10=CA_Tax23(E9:F13,K9,B33)
J12:K12J12=J10*J11
J13:K13J13=J9-J10+J12
Lambda Functions
NameFormula
CA_Tax23=LAMBDA(rngRateData,TaxableIncome,TaxCredits,LET(rng,rngRateData,s,TaxableIncome,cr,TaxCredits,b,CHOOSECOLS(rng,1),r,CHOOSECOLS(rng,2),ro,VSTACK(0,DROP(r,-1)),SUM((s>b)*(s-b)*(r-ro))-cr*0.15))
 
Last edited:
Upvote 0
I am on office 365. Not sure why it is not working. Maybe think I see in your formula you have named ranges like Taxableincome, taxcredits etc. If that is the case which areas are named?
I also tried goal seek but the reason I wanted a formula on a spreadsheet is that what I posted is only part of it. After that I need to apply to many other values and goal seek would be too long for every one and if I change a value I got to start over
 
Last edited:
Upvote 0
"I am on office 365. Maybe think I see in your formula you have named ranges like Taxableincome, taxcredits etc. "

No , these names are prompts for the input required. Check that you entered the Lambda value as specified; ensure that there is an "=" and just one "=".
 
Upvote 0
Ensure that you recorded the Lambda function.

With name manager,
specify the name new CA_Tax23
in value area enter the formula =LAMBDA(rngRateData,TaxableIncome,TaxCredits,LET(rng,rngRateData,s,TaxableIncome,cr,TaxCredits,b,CHOOSECOLS(rng,1),r,CHOOSECOLS(rng,2),ro,VSTACK(0,DROP(r,-1)),SUM((s>b)*(s-b)*(r-ro))-cr*0.15))

Save

When you enter the formula in a cell like =Ca_Tax23( Excel will show the prompts that are built into the function such rngRateDate ...
 
Upvote 0
Solution
okmy error was when I named the labda function in refers to I put the cell I put the function instead of the actual function. So working great thanks
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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