osCommerce 4 osCommerce 4 App Shop Support Services App Shop Us
• Checkout
• Get in touch

osCommerce

The e-commerce.

# How to change tax calculation algorithm?

## Recommended Posts

Default configuration assumes that the tax is calculated ONLY based on sum of the PRICE without Shipping and Handling), for examplе

Sub-Total: \$10.00

Shipping and Handling: \$9.38

NJ TAX 7.0%: \$0.70

Total: \$20.08

How to change algorithm to calculate tax based on sum of the PRICE AND Shipping and Handling?

That is:

Sub-Total: \$10.00

Shipping and Handling: \$9.38

NJ TAX 7.0%: \$0.70

Total: \$20.7366

\$10.00 + \$9.38 + 7% of (\$10.00 + \$9.38)

##### Share on other sites

In Configuration > My Store > Display Prices with Tax, set this to true. This will show your product prices INCLUSIVE of tax. This will be done throughout the store, including in the checkout procedure. This is where many Store owners don't understand the tax calculations…so let's look at an example;

Sub Total: £450.00

Postage: £32.00

Tax: £71.79

Total: £482.00

As you can see, the look of this is all wrong! The tax amount is NOT 17.5% of the total! It is actually about 14.9% - this is because all the prices are inclusive of Tax, thus:

Sub Total: £450.00 (includes tax of £67.02)

Postage: £32.00 (includes tax of £4.77)

Tax: £71.79 (is £67.02 + £4.77)

Total: £482.00 (is £450.00 + £32.00)

Now, if we look at setting Configuration > My Store > Display Prices with Tax, to false, the display will look like this:

Sub Total: £382.98

Postage: £27.23

Tax: £71.79

Total: £482.00

##### Share on other sites

thanks burt

I read this topic, but there's no additional information how to include Shipping and Handling cost in tax calculation because now tax calculated only based on good price.

As far as i know i need some manipulation with php scripts

##### Share on other sites

I hope you'll show me at least in what the file is calculation of values: Sub-Total, Shipping and Handling, Tax, Total

##### Share on other sites

If I understand your question correctly, you need to set

the applicable tax against your postage costs.

admin > modules > shipping > [edit each] > select the correct tax zone > save

##### Share on other sites

Thank you, burt! looks like that what i need! There have not tested in detail, but at the first sight calculated correctly, that is tax applied to both price and shipping and handling value. Thank you very much!

P.S. I thought that would have to change PHP scripts logic to do that behaivor, but was all easier than I thought)