Skip to content

Instantly share code, notes, and snippets.

@satputekuldip
Last active March 6, 2021 10:21
Show Gist options
  • Save satputekuldip/773b60ceb841110d71c91af3d53196f2 to your computer and use it in GitHub Desktop.
Save satputekuldip/773b60ceb841110d71c91af3d53196f2 to your computer and use it in GitHub Desktop.
GST Tax Inclusive and Exclusive Calculation

Tax Exclusive

Formula

$NetAmount = $GrossAmount * ((100 + $TAX) / 100)

Where

  • $NetAmount = Total Amount With TAX
  • $GrossAmount = Actual Amount
  • $TAX = TAX in Percentage

Example

  • $GrossAmount = 14999
  • $TAX = 18
  • $NetAmount = ?
$NetAmount = $GrossAmount * ((100 + $TAX) / 100)

$NetAmount = 14999 * ((100 + 18) / 100)
$NetAmount = 17698.82

Tax Inclusive

Formula

$TaxAmount = ($NetAmount * $TAX) / (100 + $TAX)

$GrossAmount = $NetAmount - $TaxAmount

Where

  • $NetAmount : Total Amount With TAX
  • $GrossAmount : Actual Amount
  • $TAX : TAX in Percentage
  • $TaxAmount : Only Applicable Tax Amount

Example

  • $NetAmount = 19999
  • $TAX = 18
  • $GrossAmount = ?
  • $TaxAmount = ?
$TaxAmount = ($NetAmount * $TAX) / (100 + $TAX)

$TaxAmount = (19999 * 18) / (100 + 18)
$TaxAmount = 3050.69

$GrossAmount = 19999 - 3050.69 
$GrossAmount = 16948.31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment