GST Calculator
Computes GST on a taxable amount at the standard Indian slabs (5%, 12%, 18%, 28%). For intra-state transactions the tax is split evenly between CGST and SGST; for inter-state transactions the full rate is charged as IGST.
Arguments
Pass an input object with:
amount(number, required) — the base (taxable) amount in INR, before tax.rate(number, required) — the GST rate as a percentage. Must be one of 5, 12, 18, or 28.transaction_type(string, optional) — either"intra-state"(splits tax into CGST+SGST) or"inter-state"(charged as IGST). Defaults to"intra-state".
Example
echo '{"amount": 50000, "rate": 18, "transaction_type": "intra-state"}' | python script.py