# When should I calculate tax?

Source: https://developer.avalara.com/goods-calculation-en/design-transaction-workflow/when-to-calculate-tax/

Getting a tax calculation is the main reason why developers use AvaTax Brazil. It does not matter if you are just looking to obtain a tax rate for a purchase or sale budget, or if you are looking to effect a transaction and save it in our database. At the moment you call our calculation engine, we will return the transaction and the taxes involved in it.

So when you're designing your transaction workflow, when should you calculate tax? In general, the answer is to call the tax when you want to calculate taxes naturally. Specifically for ecommerce, you will want to show taxes in the checkout workflow, which occurs after the user enters their billing and shipping information.