You can use this formula to extract the pre-tax price,
Step: 1 Total Price / (1 + r)
Step: 2 Step-1 x rate of sales tax
Step: 3 Total price – Step 2
So, the formula for pre-tax price is TP – [(TP / (1 + r) x r]