tax_us.capital_gains
Calculate US federal capital gains tax by stacking gains on ordinary taxable income, applying long-term 0/15/20% or short-term ordinary rates, with optional 3.8% NIIT.
Instructions
미국 연방 자본이득세를 계산한다. 장기(long)는 0%/15%/20% 구간을 신고 유형별로 적용하며 ordinary_taxable_income 위에 양도소득을 쌓아 과세하고, 단기(short)는 그 증가분에 일반 소득세율을 쓴다. apply_niit=true 이면 순투자소득세 3.8%를 더한다. 금액은 USD Decimal 문자열이고 기본은 소수 둘째 자리 HALF_UP이다. ordinary_taxable_income 을 생략하면 0으로 보므로 다른 소득이 있으면 반드시 넣어야 한다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gain | Yes | ||
| magi | No | ||
| term | No | long | |
| year | Yes | ||
| as_of | No | ||
| decimals | No | ||
| rounding | No | HALF_UP | |
| apply_niit | No | ||
| filing_status | Yes | ||
| include_proposed | No | ||
| ordinary_taxable_income | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tax | Yes | ||
| niit | Yes | ||
| term | Yes | ||
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| method | Yes | ||
| ltcg_tax | Yes | ||
| breakdown | Yes | ||
| niit_base | Yes | ||
| filing_status | Yes | ||
| marginal_rate | Yes | ||
| policy_sha256 | Yes | ||
| policy_source | Yes | ||
| policy_status | Yes | ||
| policy_version | Yes | 적용된 정책 문서의 식별 정보 | |
| taxable_income | Yes | ||
| policy_audit_id | Yes | ||
| policy_citations | Yes | 정책의 근거 조문 | |
| policy_effective_to | Yes | ||
| policy_effective_date | Yes | ||
| ordinary_policy_version | Yes | ||
| ordinary_taxable_income | Yes |