How to display tax rate in a Liquid file?

Topic summary

Goal: show the tax rate in a Shopify Liquid template (e.g., on a product page).

Key outcome: Liquid does not expose tax rates directly for arbitrary display. To show a rate, either hard-code the value or store it in metafields (custom data fields) and render that.

What Liquid does expose (limited):

  • Product/variant: variant.taxable (boolean).
  • Cart: cart.taxes_included (boolean). Note: shop.taxes_included is deprecated.
  • Checkout/line items (after calculation): checkout.tax_price and tax_line objects (per-line tax details once taxes are computed).
  • Customer/company context: customer.tax_exempt (boolean), company_location.tax_registration_id.

Implications: You cannot reliably display a dynamic tax percentage on the product page using a built-in variable. Any region-specific or rules-based rate would require a custom approach (e.g., metafields or app logic). VAT (Value-Added Tax) display approaches exist but rely on these same constraints.

Status: Resolved with limitations. No native tax rate variable is available in Liquid; use hard-coded values or metafields. Links to Shopify docs provided for the mentioned objects.

Summarized with AI on January 9. AI used: gpt-5.

You either need to hard code the values, or use something like metafields to expose the info in liquid.

Tax data is not exposed in liquid except if a variant is taxable, and limited places for amount on line items where tax has been actually calculated, or a id or status.

https://shopify.dev/docs/api/liquid/objects/variant#variant-taxable

https://shopify.dev/docs/api/liquid/objects/cart#cart-taxes_included

DEPRECATED https://shopify.dev/docs/api/liquid/objects/shop#shop-taxes_included

https://shopify.dev/docs/api/liquid/objects/checkout#checkout-tax_price

https://shopify.dev/docs/api/liquid/objects/tax_line

https://shopify.dev/docs/api/liquid/objects/cart#cart-taxes_included

https://shopify.dev/docs/api/liquid/objects/company_location#company_location-tax_registration_id

https://shopify.dev/docs/api/liquid/objects/customer#customer-tax_exempt

Also see the many topics on VAT price displays.