Liberator - 1 year ago 45

SQL Question

I am trying to calculate the 19% of taxes from the total amount like this

`<?php echo number_format($show['total']*0.19,0,',',''); ?>`

The problem is, the product total price is 12990 so the real and correct taxes from this amount including the taxes is 2074 but with this code the result I get is 2468 and that is incorrect...

What is the correct formula to get the 19% taxes from the total amount including the taxes ( total to pay with taxes included )

Answer Source

Since you have value which is effectively 119%, you need

```
$show['total'] / 1.19 * 0.19
```