---
title: US Sales Tax Calculator API
slug: us-sales-tax-calculator
url: https://apyhub.com/freedailypro/service/us-sales-tax-calculator
provider: FreeDailyPro
categories: [Verification Kit]
tags: [sales-tax, tax-calculation, tax-extraction, us-taxes, checkout]
auth: api_key
version: 1.4.0
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# US Sales Tax Calculator API

Calculate U.S. sales tax from an amount or itemized cart. Add or extract tax using a ZIP, state, or explicit tax rate.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/freedailypro/us-sales-tax-calculator/sales-tax` | What it does Calculates sales tax for a US amount using either a provided tax rate, a US state look… | 10 |

## Endpoint reference

### Calculate sales tax on an amount, adding or extracting tax, with US state base-rate lookup

`POST https://api.eu.apyhub.com/freedailypro/us-sales-tax-calculator/sales-tax` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `zip` | body | string | no | US ZIP code, 5 digits or ZIP+4. Used to find the state. A rate is applied only where it is exact: 0% for DE, NH and OR, or the state rate for states with no local add-on. For any other ZIP, or a ZIP… |
| `mode` | body | string | no | add (default) adds tax on top of the amount. extract treats the amount as tax-inclusive and returns the net and the tax in it. extract cannot be used with items. One of: add, extract. Default: `add`. |
| `items` | body | array of object | no | A cart of 1 to 100 items. Add mode only. A response adds cart with taxable and exempt subtotals, tax, total, steps and lines. |
| `items[].qty` | body | integer | no | Quantity. Whole number, minimum 1. Default 1. Default: `1`. |
| `items[].name` | body | string | no | Item name, shown in the calculation steps. |
| `items[].price` | body | number | yes | Price of one unit. |
| `items[].taxable` | body | boolean | no | Set to false to mark the item as exempt. Default true. Default: `true`. |
| `state` | body | string | no | US state code (for example TX) or full name (for example Texas), including DC. Not case sensitive. Uses the state base sales tax rate only (Tax Foundation, 1 July 2026). City, county and district rat… |
| `amount` | body | number | no | Amount to tax, or the tax-inclusive amount in extract mode. Required unless items is sent. |
| `shipping` | body | number | no | Shipping charge. Items mode only. |
| `taxPercent` | body | number | no | Tax rate in percent. Takes priority over state and zip. Required unless state or an exact zip is sent. |
| `discountPct` | body | number | no | Discount in percent taken off the items before tax. Items mode only. Shipping is not discounted. |
| `shippingTaxable` | body | boolean | no | true if shipping is taxed. Default false. Items mode only. Whether shipping is taxable depends on the state. Default: `false`. |

#### Quickstart

Calculate sales tax from a simple amount and state lookup.

```bash
curl -X POST "https://api.eu.apyhub.com/freedailypro/us-sales-tax-calculator/sales-tax" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "TX",
    "amount": 100
  }'
```

#### What you'll get back

Returns a JSON object with no declared fields in the output schema.


```json
{
  "result": {
    "taxAmount": 6.25,
    "total": 106.25,
    "net": 100,
    "amount": 100,
    "ratePct": 6.25,
    "rateSource": "US state base rate (local taxes excluded)",
    "state": "Texas",
    "stateBaseRatePct": 6.25,
    "averageCombinedRatePct": 8.2,
    "ratesAsOf": "Tax Foundation, 1 July 2026",
    "ratesAsOfDate": "2026-07-01",
    "ratesCheckedOn": "2026-10-30",
    "ratesAgeDays": 134,
    "ratesStale": false,
    "taxYear": 2026,
    "dataStatus": "estimate",
    "notes": [
      "Rate used: Texas STATE base rate 6.25%. Local (city, county, district) sales taxes are not included; the average combined rate is 8.2% (reference only, not applied). For an exact local rate send taxPercent."
    ],
    "disclaimer": "Estimate for information only. Not tax, legal or financial advice; check the figures with the tax authority or a qualified adviser."
  }
}
```

## About

## What it does
Sales Tax Calculator lets you add or extract U.S. sales tax from a single amount or a cart of items. Send a tax rate directly with `taxPercent`, look up the base state rate with `state`, or resolve the state from an exact `zip` when the ZIP code maps cleanly.

Use `mode: add` to calculate tax, subtotal, and total for an `amount` or an `items` array. For itemized carts, each item can include `qty`, `name`, `price`, and `taxable`; you can also apply `discountPct`, `shipping`, and `shippingTaxable`. Use `mode: extract` when you already have a tax-inclusive amount and need the pre-tax value and tax amount separated.

The response is plain JSON, with the computed sales tax result and any ZIP lookup details when you use `zip`. That makes it useful for checkout logic, invoice generation, quote tools, and internal pricing calculators where you need a consistent tax estimate without wiring in a full tax engine.

Sales Tax Calculator is designed for state-level calculation only. It does not guess local city, county, or district add-ons, so for addresses where those matter you should provide `taxPercent` yourself or use a known state rate.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/freedailypro/service/us-sales-tax-calculator
