Tax-alpha: gain & loss harvesting
After-tax return you can add without changing the portfolio's risk. Two levers here — realizing gains that land in the 0% long-term bracket, and harvesting losses to offset gains and ordinary income — plus a pointer to asset location.
1 · Harvest gains at 0%
How much gain can a client realize at a 0% federal rate this year?
/v1/tax/gain-harvesting.
curl -X POST https://api.numeratica.com/v1/tax/gain-harvesting \
-H "Authorization: Bearer nmr_sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"tax_year": 2026, "filing_status": "mfj",
"taxable_income": 60000, "magi": 60000, "realize_amount": 40000
}'{
"result_id": "gh_d1dd39ff48d71149",
"engine_version": "gain-harvesting-1.0.0",
"result": {
"ltcg_zero_room": 38900,
"ltcg_fifteen_room": 514800,
"realization": {
"amount_at_0": 38900, "amount_at_15": 1100, "amount_at_20": 0,
"ltcg_tax": 165, "niit": 0, "total_tax": 165, "marginal_rate": 0.15
}
},
"disclaimer": "Calculation engine output for informational purposes only; not tax or financial advice."
}This couple has $38,900 of room in the 0% bracket. Realizing $40,000 of long-term gains costs just $165 (the last $1,100 spills into 15%) — an effective rate of 0.4%. Reset the cost basis for free.
2 · Harvest losses
Quantify the benefit of realizing a loss — offsetting gains, then $3,000 of ordinary income, then
carrying the rest forward — with /v1/tax/tlh-benefit.
curl -X POST https://api.numeratica.com/v1/tax/tlh-benefit \
-H "Authorization: Bearer nmr_sk_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"tax_year": 2026, "filing_status": "mfj", "taxable_income": 200000,
"harvestable_loss": 50000, "offsettable_gains": 30000,
"growth_rate": 0.06, "reinvestment_years": 10
}'{
"result_id": "tlh_de81d102225fec47",
"engine_version": "tlh-1.0.0",
"result": {
"gains_offset": 30000, "ordinary_offset": 3000, "carryforward": 17000,
"immediate_tax_saving": 5160, "future_tax_recapture": 4950,
"net_present_value": 2395.95,
"wash_sale_caveat": "Buying a substantially identical security within 30 days before or after the sale disallows the loss (§1091); not checked here."
},
"disclaimer": "Calculation engine output for informational purposes only; not tax or financial advice."
}The $50k loss saves $5,160 now (gains at 15% + $3,000 ordinary at 22%) with $17,000 carried forward; because harvesting lowers basis, some tax is recaptured later — the honest number is the $2,396 net present value, not the headline saving. Mind the wash-sale rule.
Related: /v1/tax/asset-location
places the highest-tax-drag assets in sheltered accounts and reports the drag saved vs. a pro-rata split.
3 · Render it
<div style="font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;max-width:440px;border:1px solid #e6e9ef;border-radius:14px;overflow:hidden;color:#1a2230">
<div style="background:#ecfdf5;padding:16px 20px;border-bottom:1px solid #e6e9ef">
<span style="display:inline-block;background:#047857;color:#fff;font-size:12px;font-weight:700;padding:3px 11px;border-radius:999px;letter-spacing:.04em">TAX ALPHA</span>
<div style="color:#5b6675;font-size:13px;margin-top:12px">Long-term gains you can realize at 0% federal</div>
<div style="font-size:34px;font-weight:700;color:#047857;line-height:1.1">$38,900</div>
</div>
<div style="padding:8px 20px 14px;font-size:14px">
<div style="display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #f1f3f7"><span style="color:#5b6675">Tax to realize $40,000</span><strong>$165 (0.4%)</strong></div>
<div style="display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #f1f3f7"><span style="color:#5b6675">Loss-harvest saving (now)</span><strong>$5,160</strong></div>
<div style="display:flex;justify-content:space-between;padding:7px 0"><span style="color:#5b6675">Loss-harvest benefit (NPV)</span><strong>$2,396</strong></div>
</div>
<div style="padding:10px 20px;color:#5b6675;font-size:12px;border-top:1px solid #f1f3f7">MFJ · 2026 · result_ids gh_d1dd39ff48d71149 / tlh_de81d102225fec47 · not tax advice</div>
</div>