Amount before sales tax x (GST rate/100) = GST amount
Amount without sales tax x (QST rate/100) = QST amount
Amount without sales tax + GST amount + QST amount = Total amount with sales taxes
GST rates have been the same since 2008 at 5%.
QST rates have been the same since 2013, at 9.975%.
You can also reverse the calculation and get the total amount without the taxes. The simple formula for the same is:
Amount with sales taxes-GST(5%)-QST= Amount without the taxes.