Hello,
Sorry for the confusion, it is not a code, they are the formulas used in the background to calculate taxes. In WooCommerce to set up taxes you will need to tell WooCommerce if your prices will be inclusive or exclusive of taxes, you can define your tax rates, and the taxes will apply depending on the customer location.
Checking your example, the formulas will work like this:
For tax exclusive, in this case, the tax is calculated and added to the price. The price is 100, and the tax is 6, total 106.
tax_amount = price * ( tax_rate_% / 100 )
tax_amount = 100 * ( 6 / 100 )
tax_amount = 100 * ( 0.06 )
tax_amount = 6
For tax inclusive, please note in this case your price is including the tax, the final price is 106 because it is including the tax.
tax_amount = price - ( price / ( ( tax_rate_% / 100 ) + 1 ) )
tax_amount = 106 - ( 106 / ( ( 6 / 100 ) + 1 ) )
tax_amount = 106 - ( 106 / ( ( 0.06 ) + 1 ) )
tax_amount = 106 - ( 106 / ( 1.06 ) )
tax_amount = 106 - ( 100 )
tax_amount = 6
In the example you gave us at the beginning of this thread, be sure to navigate to WooCommerce > settings > tax, and enable prices inclusive of tax.
To learn more, please check:
Setting up Taxes in WooCommerce.
How Taxes Work in WooCommerce.
Let us know if there are any questions.

Link to image: https://snipboard.io/5BTtdw.jpg