Created
February 18, 2022 13:13
-
-
Save benkant/5b7395ba63997c51d893a6f37e826d8d to your computer and use it in GitHub Desktop.
Calculate nett income after tax and Medicare for Australia 2021-2022 via Excel UDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Function INCOMENETTAU(ByVal gross As Double, Optional monthly = False) As Double | |
' (AU) Return the nett income after tax and Medicare Levy for the given gross income, optionally for a single month | |
Dim tax As Double | |
Dim medicareLevy As Double | |
Dim nett As Double | |
medicareLevy = gross * 0.02 | |
Select Case gross | |
Case Is >= 180001 | |
tax = 51667 + 0.45 * (gross - 180000) | |
Case Is >= 120001 | |
tax = 29467 + 0.37 * (gross - 120000) | |
Case Is >= 45001 | |
tax = 5092 + 0.325 * (gross - 45000) | |
Case Is >= 18201 | |
tax = 0.19 * (gross - 18200) | |
Case Else | |
tax = 0 | |
End Select | |
nett = gross - tax - medicareLevy | |
If monthly Then | |
INCOMENETTAU = nett / 12 | |
Else | |
INCOMENETTAU = nett | |
End If | |
End Function | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment