# Option to display prices with tax included

Source: https://developer.avalara.com/ecommerce-integration-guide/designing/tax-included-option/

**Element type:** Suggested

**Endpoints/Models used:** [LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

When creating transactions, consider whether to include an option that shows prices with sales tax included. A `taxIncluded` option tells AvaTax to use a product’s price as a target for the total sale. As a result, AvaTax will back the tax out of the total amount provided in the request. Note that AvaTax will also factor in the exemption status and the local tax rate. Consider the following scenarios:

-   **Tax Excluded Scenario**: When you sell a product for a price of $100, tax is calculated on the amount and added to the total sale price. The local tax rate in Irvine, California totals 7.75% for our test company, so with tax you’ll pay $107.75; and the store selling you the product will pay $7.750 to the tax authority on their next sales tax filing. The result is that you get your product, the store gets $100, and the tax authority gets $7.75.

-   **Tax Included Scenario**: Now, let’s introduce the `TtaxIncluded` option. When you set `taxIncluded` to `true`, AvaTax will perform slightly different math. Instead of calculating the tax on top of the purchase amount, the AvaTax calculates tax to ensure that the final amount equals $100 directly. The result is that you still calculate the correct tax rate, but the store knows the revenue amount when the sale is made, with no month-end finagling. The store keeps $92.81, and pays $7.19 of tax - which reflects the correct tax rate of 7.75%.

The `taxIncluded` option appears on the line element in your CreateTransaction model. This means that you can sell a mixture of tax-included and tax-excluded items in a single transaction. Here’s an API call that demonstrates the Tax Included scenario above:

[![Closed](https://avalara-devdocs-prod.mcoutput.com/avatax-for-ecom/Content/Skins/Default/Stylesheets/Images/transparent.gif)Example](javascript:void\(0\);)

```
 {  "lines": [    {      "amount": 100,      "taxIncluded": "true"    }  ],  "type": "SalesInvoice",  "companyCode": "DEFAULT",  "date": "2024-07-22",  "customerCode": "ABC",  "addresses": {    "singleLocation": {      "line1": "2000 Main Street",      "city": "Irvine",      "region": "CA",      "country": "US",      "postalCode": "92614"    }  }} 
```

The result ensures that the total price paid matches the requested amount exactly, and that the tax rate produces the correct tax amount. Most importantly, this calculation will remain correct for any local tax rate - and you’ll have happy customers without many unwanted changes in their pockets!