sales tax
sales_taxCalculates total cost including sales tax for a purchase. Given a unit price, tax rate percentage, and optional quantity, computes the subtotal (price times quantity), the tax amount rounded to two decimal places, and the final total. Useful for estimating purchase costs across US states and municipalities with different tax rates, comparing pre-tax and post-tax prices, and budgeting. Chain into salary_to_hourly to see how many work-hours a purchase represents.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"price": "<price>"
},
"name": "sales_tax"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | Unit price of the item in dollars (or any currency). Must be positive. | |
| quantity | No | Number of items to purchase. Defaults to 1. | |
| tax_rate_pct | No | Sales tax rate as a percentage (e.g. 8.875 for 8.875%). Defaults to 0 — enter your local rate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total | Yes | Subtotal plus tax amount. | |
| subtotal | Yes | Price times quantity before tax. | |
| tax_amount | Yes | Total tax amount, rounded to two decimal places. | |
| effective_rate_pct | Yes | The tax rate applied, echoed back for confirmation. |