## HP15c program: Calculate Canadian Sales Tax (GST/PST)

```command         display

f LBL A        001-42,21,11
STO 3        002-    44 3
Enter        003-      36
Enter        004-      36
5            005-       5         (this is the GST rate, here 5%)
g %            006-   43 14
STO + 3      007-44,40, 3
x><y         008-      34
9            009-       9         (this is the PST rate, here 9.975%)
.            010-      48
9            011-       9
7            012-       7
5            013-       5
g %            014-   43 14
STO + 3      015-44,40, 3
x><y         016-      34
R_arrow_down 017-      33
RCL 3        018-    45 3
g RTN          019-   43 32
```

This program uses the following label: LBL A
The program uses STO register 3. Register 3 holds at the end of the program the total including tax.

### Using the program

This program calculates the total including all sales taxes (VAT) and the individual tax portions. Modify the rates as needed (the 5% and 9.975% in the above code). A list of different tax rates for Quebec (Canada) can be found at http://www.revenuquebec.ca/en/entreprises/taxes/tpstvhtvq/reglesdebase/historiquetauxtpstvq.aspx.

Enter the amount before tax and then run the program by pressing "GSB A" (or as an alternative just enter the amount and just press f A).

After the execution of the program the stack will look a follows:
```T: amount before tax (=whatever was in X when the program was started)
Z: GST amount
Y: PST amount
X: Total with tax (amount before tax+GST+PST)
```

You can scroll through the stack to look at the different values by pressing R_arrow_down multiple times.

The total with tax (total + vat) is as well stored in register 3 and can be retrieved by pressing RCL 3.

Example to test the program:
Amount before tax = 220
```220
GSB A
```
Expected result:
 T 220 Z 11 Y 21.945 X 252.945