A tax is a compulsory financial charge or some other type of levy imposed upon a taxpayer by a governmental organization in order to fund various public expenditures. Any business would collect a percentage of the net amount of any product or service from the consumer, which is then paid to the government.
An example of tax collected by businesses in India is GST. Goods and Services Tax (GST) is an indirect tax imposed in India on the supply of goods and services. Goods and services are divided into five different tax slabs for collection of tax - 0%, 5%, 12%, 18% and 28%.
Based on the slab in which the product lies, the percentage can be calculated on the net price of the product being bought. When multiple items are being bought, the net price of all the products is added which makes the subtotal of the bill. Based on the tax levied on each item, the sum total of tax on all items is added to the sub-total of the bill, and finally, the bill total is calculated.
In the above screenshot, a sum total 5% GST (2.5%SGST and 2.5%CGST) is being calculated on every item added to the cart is being to the order subtotal to make the final total of the bill.