# When should I calculate tax?

Source: https://developer.avalara.com/vat-erp/design-the-document-workflow/when-to-calculate-tax/

Getting a tax calculation is the primary reason developers use AvaTax, and [CreateTransactio](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/)n is the starting point.

But when will you collect tax? The answer varies from system to system, but in general, balance between an efficient use of the API and when your application's transaction workflow requires tax.

**Note**: Be sure that your system isn’t calling tax every time a line is added or changed because this can drive up usage.

**Advice**: Consider providing an explicit **Calculate tax** button, or simply calculate tax automatically before saving the document.