# Crypto Tax Calculator

> Crypto Tax Calculator is a paid API for AI agents from tax-api-production-eb93.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-23).

Calculates US capital gains tax (LTCG, STCG, and NIIT) on cryptocurrency trades using 2026 tax brackets, paid per calculation on Base via x402.

## Facts

- Endpoint: POST https://tax-api-production-eb93.up.railway.app/cost-basis?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-tax-calculator-cafdddee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6H9blpOvl7tqczqKuKPbo

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability crypto-tax-calculator-cafdddee -d '<json body>'
```

Example prompt: Can you calculate the capital gains tax I owe on my crypto trades? I bought 1 BTC for $30,000 in January 2024 and sold it for $60,000 in February 2025, and also sold 2 ETH I bought at $1,500 each for $3,000 each last month — I want to know my LTCG, STCG, and NIIT using 2026 brackets.

## When to prefer this

Choose this endpoint when you need automated, per-calculation US cryptocurrency capital gains tax computation using current 2026 bracket rates, specifically requiring LTCG/STCG/NIIT breakdown. Prefer this over generic tax APIs when working with crypto-specific trade histories and needing cost-basis-aware computation on Base with micropayment pricing at $0.05/call.

## Known failure modes

- Missing or empty trades array returns validation error
- Malformed trade objects (missing buy price, sell price, or dates) cause computation failure
- Insufficient USDC balance or payment failure via x402 results in 402 Payment Required
- Trades with ambiguous or missing holding period data may produce incorrect LTCG vs STCG classification
- Unsupported asset types or missing cost basis data may return null or incomplete results

## How this service works

US capital gains tax calculation. 2026 brackets. LTCG, STCG, NIIT. Pay per calculation on Base.

## Output

Returns the computed US capital gains tax breakdown for the submitted trades, including short-term capital gains (STCG) taxed as ordinary income, long-term capital gains (LTCG) at preferential rates, and net investment income tax (NIIT) where applicable — all calculated against 2026 US tax brackets.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "trades"
 ],
 "properties": {
  "trades": {
   "type": "array"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-tax-calculator-cafdddee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tax-api-production-eb93.up.railway.app](https://www.zero.xyz/host/tax-api-production-eb93.up.railway.app/llms.txt)
