{"uid":"cap_Vl45ROUJRq4s5A084C4Zv","slug":"us-capital-gains-tax-estimator-ff4f7351","name":"US Capital Gains Tax Estimator","description":"US capital gains tax estimate: long-term 0/15/20 percent rates or short-term ordinary rates, plus the net investment income tax. Pure computation over your inputs, not tax advice.","url":"https://api.agentstools.dev/tax/capgains","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["gain"],"properties":{"gain":{"type":"number","description":"Capital gain amount (>= 0)"},"tax_year":{"type":"integer","description":"Tax year, default 2026"},"filing_status":{"enum":["single","married_jointly","married_separately","head_of_household"],"type":"string","description":"Filing status, default single"},"holding_period":{"enum":["long","short"],"type":"string","description":"long uses 0/15/20 rates; short uses ordinary rates"},"ordinary_income":{"type":"number","description":"Other taxable income, used to stack the gain into brackets"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__56Ql7qk3LQAhBh_9kFFX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates US capital gains tax liability using long-term (0/15/20%) or short-term ordinary rates, plus net investment income tax, given gain amount, filing status, and income context.","exampleAgentPrompt":"I sold stock I'd held for two years and made a $85,000 long-term capital gain — I'm a single filer with about $120,000 in ordinary income for 2026. Can you estimate my total capital gains tax including any net investment income tax?","exampleUseCases":null,"resultDescription":"Returns a computed breakdown of US capital gains tax liability, including the applicable long-term rate tier (0%, 15%, or 20%) or short-term ordinary rate applied to the gain, net investment income tax (3.8%) if applicable, and total estimated tax owed — based purely on the provided inputs.","failureModes":["Missing required 'gain' parameter returns a 400 error","Negative gain value rejected as invalid input","Unrecognized filing_status enum value returns validation error","Non-numeric gain or ordinary_income value returns a parse error","Unsupported tax_year value may return an error or fall back to default"],"whenToPreferThis":"Use this endpoint when you need a fast, pure-computation capital gains tax estimate for a US taxpayer without calling a full tax engine. Ideal for investment decision tools, financial planning assistants, or pre-sale tax impact calculators. Prefer this over generic tax APIs when you specifically need LTCG bracket stacking logic and NIIT computation in a single lightweight call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:11:14.624Z","isFirstParty":false}