{"uid":"cap_WLLFpfW0XV9zPwWRTvjFf","slug":"us-capital-gains-tax-estimator-df30e74e","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://payai.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_KJv08PQ7wBWbD_QhBKXox","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":"Computes estimated US capital gains tax liability using long-term (0/15/20%) or short-term ordinary rates, plus net investment income tax (NIIT), based on gain amount, filing status, holding period, and other income.","exampleAgentPrompt":"I sold some stock and realized a $75,000 long-term capital gain in 2026 — I'm single and my other taxable income is about $120,000. Can you estimate my federal capital gains tax, including any net investment income tax?","exampleUseCases":[{"title":"Stock sale tax planning before year-end","prompt":"I'm thinking of selling shares with a $40,000 long-term gain before the end of 2026. I'm married filing jointly and my ordinary income this year is around $180,000 — what's my estimated capital gains tax bill including NIIT?"},{"title":"Short-term gain tax estimate for crypto trader","prompt":"I held some crypto for only 6 months and sold it for a $15,000 gain. I'm single with $85,000 in other taxable income for 2026 — how much will I owe in short-term capital gains taxes?"},{"title":"Retirement planning: low-income capital gains rate check","prompt":"My retired parents are married filing jointly and expect only $60,000 in ordinary income this year. They have a $30,000 long-term capital gain from selling mutual funds in 2026 — will they qualify for the 0% capital gains rate?"}],"resultDescription":"Returns the estimated federal capital gains tax amount broken down by applicable rate bracket (0%, 15%, 20% for long-term; ordinary income brackets for short-term), the net investment income tax (3.8% NIIT) if applicable, and likely the total estimated tax owed — all computed purely from the provided inputs with no state tax or advice.","failureModes":["Missing required 'gain' parameter returns a validation error","Negative gain value rejected (must be >= 0)","Invalid filing_status enum value causes a 400-level error","Non-integer tax_year or unsupported future/past year may produce unexpected results","Invalid holding_period enum value ('long' or 'short' only) causes error"],"whenToPreferThis":"Use this endpoint when you need a fast, deterministic computation of US federal capital gains tax for a specific gain amount without calling a full tax engine or advisory service. Ideal for investment tools, financial planning agents, and portfolio dashboards that need quick bracket and NIIT estimates inline. Prefer over generic tax APIs when you specifically need long-term vs short-term rate differentiation and NIIT computation in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:47:28.064Z","isFirstParty":false}