How the GST Calculator Works
The calculator runs one tax identity in both directions. In Add GST mode the typed amount is the net (tax-exclusive) value: GST = net × rate ÷ 100 and gross = net × (1 + rate ÷ 100). In Remove GST (reverse) mode the amount is the GST-inclusive total: net = gross ÷ (1 + rate ÷ 100) and GST = gross − net. The applicable rate is one of India’s slabs — 0%, 3%, 5%, 12%, 18% or 28% — or a custom value, and the computation is a pure function in a small, unit-tested engine that returns the net, GST and gross plus the head-wise split.
- Add GST: GST = net × rate ÷ 100; gross = net × (1 + rate ÷ 100)
- Remove GST: net = gross ÷ (1 + rate ÷ 100); GST = gross − net
- Slabs 0 / 3 / 5 / 12 / 18 / 28% plus a custom rate
- Same identity run forwards (add) or backwards (reverse)
- All math is client-side JavaScript with no server round-trip
