Add or remove sales tax from a price.
Tax = Amount × Rate ÷ 100, and the total is the amount plus that tax.
Amount before tax = Amount × 100 ÷ (100 + Rate). This 'reverses' the tax calculation so you can see the pre-tax price from a total that already includes tax.
It's the same underlying math, but without the India-specific CGST/SGST split — useful for any general sales or consumption tax.