How to Calculate GST on an Invoice (2026) — With Worked Examples
The exact arithmetic for GST on any invoice: inclusive vs exclusive, multiple rates on one bill, discounts, freight, and the CGST/SGST split. With 6 worked examples.
GST math is not hard, but it has edge cases that trip people up — discounts, mixed-rate invoices, freight charges, round-off, and the difference between inclusive and exclusive pricing. Get it wrong on 500 invoices and you’ve either over-collected from customers or under-paid the government.
This post walks through the calculation from scratch, with six worked examples in ₹.
The basic formula (exclusive-of-GST pricing)
When your price is exclusive of GST — the usual B2B case:
taxable value = qty × rate
gst_amount = taxable_value × (gst_rate / 100)
grand_total = taxable_value + gst_amount
For same-state (intra-state) transactions:
cgst_amount = taxable_value × (gst_rate / 2 / 100)
sgst_amount = taxable_value × (gst_rate / 2 / 100)
igst_amount = 0
For cross-state (inter-state) transactions:
cgst_amount = 0
sgst_amount = 0
igst_amount = taxable_value × (gst_rate / 100)
See our full CGST vs SGST vs IGST breakdown if those three taxes feel confusing.
Worked example 1 — Simplest case, intra-state
You sell a laptop for ₹50,000 to a buyer in the same state.
HSN 8471 family — laptops → 18% GST.
| Line | Value |
|---|---|
| Taxable value | ₹50,000 |
| CGST @ 9% | ₹4,500 |
| SGST @ 9% | ₹4,500 |
| IGST | ₹0 |
| Grand total | ₹59,000 |
Customer pays ₹59,000. You remit ₹4,500 CGST to centre, ₹4,500 SGST to state.
Worked example 2 — Same sale, different state
Same laptop, ₹50,000, but buyer is in another state.
| Line | Value |
|---|---|
| Taxable value | ₹50,000 |
| CGST | ₹0 |
| SGST | ₹0 |
| IGST @ 18% | ₹9,000 |
| Grand total | ₹59,000 |
Total is identical — only the tax labels change. Centre collects IGST and distributes the state’s portion to the destination state later.
Worked example 3 — Discount before tax
You list a shirt at ₹2,000, but offer a 10% trade discount before GST.
HSN 6205 — Men’s shirts → 12% GST (if sale price ≤ ₹1,000) or 12% otherwise.
| Line | Value |
|---|---|
| List price | ₹2,000 |
| Discount (10%) | −₹200 |
| Taxable value | ₹1,800 |
| CGST @ 6% | ₹108 |
| SGST @ 6% | ₹108 |
| Grand total | ₹2,016 |
Discounts applied before GST calculation reduce the taxable value. The GST is calculated on the net ₹1,800, not the list ₹2,000.
If the discount is applied after GST (rare — usually a post-sale adjustment), you’d issue a credit note to reduce the invoice value post-fact.
Worked example 4 — Mixed rates on one invoice
You’re a kirana store. One bill has rice (5% GST), soap (18% GST), and biscuits (18% GST).
| Item | HSN | Qty | Rate | Taxable | Rate | CGST | SGST |
|---|---|---|---|---|---|---|---|
| Rice | 1006 | 10kg | ₹60 | ₹600 | 5% | ₹15 | ₹15 |
| Soap | 3401 | 5 | ₹40 | ₹200 | 18% | ₹18 | ₹18 |
| Biscuits | 1905 | 3 | ₹50 | ₹150 | 18% | ₹13.50 | ₹13.50 |
| Subtotal | ₹950 | ₹46.50 | ₹46.50 | ||||
| Grand total | ₹1,043 |
Each line calculates its own GST; the invoice footer aggregates. Your GSTR-1 HSN summary groups by HSN + rate.
Worked example 5 — Freight / shipping charges
You sell ₹10,000 of electronics and charge ₹500 for shipping.
Question: does shipping get GST? Usually yes, at the same rate as the goods (this is called a composite supply — the main supply is the goods, freight is incidental).
| Line | Value |
|---|---|
| Electronics (taxable) | ₹10,000 |
| Freight (taxable) | ₹500 |
| Total taxable value | ₹10,500 |
| CGST @ 9% | ₹945 |
| SGST @ 9% | ₹945 |
| Grand total | ₹12,390 |
If freight had been separately taxable at GTA rate (5% RCM), you’d split it differently — but for normal courier/direct shipping, treat it as composite with the main supply. See our transport services SAC page for the GTA edge cases.
Worked example 6 — Inclusive-of-GST pricing (B2C retail)
On a B2C shelf price, the label often shows the final price inclusive of GST. To derive the tax from an inclusive price:
taxable_value = inclusive_price × 100 / (100 + gst_rate)
gst_amount = inclusive_price − taxable_value
You sell a shirt labelled ₹1,200 (MRP, inclusive). GST rate = 12%.
- Taxable value = ₹1,200 × 100 / 112 = ₹1,071.43
- GST total = ₹1,200 − ₹1,071.43 = ₹128.57
- CGST = ₹64.29, SGST = ₹64.29
MRP is always inclusive — there’s a rule under Legal Metrology. Your billing tool should support both inclusive and exclusive entry.
Round-off
GST amounts in paise confuse customers. Most tools round the grand total to the nearest rupee and book the difference as round off. It’s a 1-paise-to-50-paise adjustment, shown as a separate line on the invoice.
Example: calculated total = ₹1,043.25 → grand total printed = ₹1,043 → round off = ₹0.25 (adjusted, not taxed again).
In 21bill, this happens automatically with a round_off column on invoices.
The math 21bill handles automatically
If you’re tracking all this manually in a spreadsheet, stop. 21bill computes every piece — line taxable, CGST/SGST/IGST per line, invoice totals, HSN summary, GSTR-1 rollup — from the point you pick a product and enter a quantity.
The primitives that drive the calc:
- Your organisation’s
state_code(compared to invoice’splace_of_supply) - The product’s
gst_rate(one of 0, 0.25, 3, 5, 12, 18, 28) - Any
discount_percentper line - The
rateper unit andqty
Every one of those has a DB-level constraint so bad data can’t slip in (rates are whitelisted, amounts can’t be negative, GSTIN regex is enforced).
Common calculation mistakes
1. Applying discount after GST instead of before. Changes the tax you remit. See example 3 for the right way.
2. Charging GST on freight at the wrong rate. For normal courier freight billed to your customer, use the same rate as the main goods. For GTA/registered freight, it’s 5% under RCM — separate flow.
3. Forgetting the round-off line. Most portals flag “grand total doesn’t match sum of CGST + SGST + IGST + taxable”. Round off fixes this without re-maths.
4. Wrong state code → wrong split. State code 27 (Maharashtra) ≠ 07 (Delhi). Single-digit typos flip an invoice from intra-state (CGST + SGST) to inter-state (IGST). Our HSN directory lists state codes alongside category info.
5. Composition scheme dealers charging GST. Composition dealers can’t show GST on invoices. They pay a flat rate out of pocket — topic for a separate post.
Quick reference — rate-to-split table
| GST rate | CGST | SGST | IGST |
|---|---|---|---|
| 0% (exempt) | 0% | 0% | 0% |
| 0.25% | 0.125% | 0.125% | 0.25% |
| 3% | 1.5% | 1.5% | 3% |
| 5% | 2.5% | 2.5% | 5% |
| 12% | 6% | 6% | 12% |
| 18% | 9% | 9% | 18% |
| 28% | 14% | 14% | 28% |
Print this or bookmark it.
Related reading:
Invitation only — request access
21bill is a closed-tenant billing platform for Indian SMBs. Each organisation is onboarded directly by our team — contact us to request access.
Request accessKeep reading
-
Composition Scheme Billing in India (2026) — Bill of Supply, CMP-08, GSTR-4
How composition dealers actually bill customers. Why you can't charge GST, what a Bill of Supply looks like, and how quarterly CMP-08 + annual GSTR-4 work.
-
CGST vs SGST vs IGST — What's Different and When Each Applies (2026)
The only GST-split explainer Indian SMBs need. CGST + SGST for same-state, IGST for cross-state — with real invoice examples, rate math, and common mistakes.
-
E-Invoicing Turnover Limit 2026 — What Changes at ₹5 Cr
The current e-invoicing threshold, who crosses it, what IRN + QR means on your invoice, and what your billing software has to do differently once you're above ₹5 Cr.