Principles
InvestMA is an educational tool. It illustrates how contributions, returns, fees, dividends, inflation and federal taxes interact. It does not predict markets and is not investment or tax advice.
All calculations run in your browser: the amounts you enter are never sent anywhere. Only an anonymous, cookieless audience measurement counts page views (Vercel Analytics). Amounts are computed at full precision and rounded to the cent only for display. Simulations start on the first day of next month.
Rate conversion
Annual rates are converted to the equivalent monthly rate geometrically, not by dividing by 12:
r_monthly = (1 + r_annual)^(1/12) − 1
The same conversion applies to yearly fees and to the dividend yield.
Monthly sequence
- contribution at the start of the month, net of any purchase fee;
- monthly price return;
- dividends, minus the tax taken from them (taxable account), reinvested or paid out;
- monthly share of the yearly expense ratio and account fee, on the portfolio value.
This engine is shared with InvestMA Morocco and checked in automated tests against the closed-form future value when there are no fees or dividends.
Federal income tax
Tax follows the structure of the IRS Qualified Dividends and Capital Gain Tax Worksheet. Taxable income is your income minus the standard deduction ($16,100 single, $32,200 married filing jointly, $24,150 head of household* in 2026).
- Wages, short-term gains (held one year or less) and non-qualified dividends: ordinary brackets.
- Long-term gains (held more than one year) and qualified dividends: 0%, 15% or 20%, stacked on top of the ordinary part of taxable income. A gain can therefore be taxed partly at 0% and partly at 15%; one flat rate is never applied to the whole gain.
- The result is capped at the regular tax on all taxable income, as on the worksheet.
- Capital losses offset gains; a net loss reduces other income by up to $3,000 a year and the rest carries forward (not carried into later simulations).
The tax due to an investment is the tax with the investment income minus the tax without it, so gains and dividends are taxed at the rates they actually reach on top of your other income.
Dividends
Price return and dividend yield are separate inputs: do not include dividends in the price return. Dividends accrue monthly on the value after the price return. In a taxable account, each calendar year's dividends are taxed on top of that year's other income; the qualified share uses the 0/15/20% rates and the rest ordinary rates. The tax is taken from the dividends as they are paid, so only the after-tax amount is reinvested. The yearly rate is solved so that the tax taken equals the tax due on that year's actual dividends, to the cent.
Money-market and bond fund distributions are interest and generally not qualified; the presets set their qualified share to 0%.
The final sale
In the investment calculator, everything is sold on the first day of the month after the last period. Each contribution and each reinvested dividend is tracked as a separate lot: lots held more than 12 months give long-term gains, the others short-term gains (a lump sum held exactly 12 months is short-term). The sale is taxed on top of that year's other income and dividends.
gain = proceeds after sale fees − cost basis (contributions incl. fees + reinvested dividends)
NIIT and state tax
Net investment income tax (3.8%, IRC §1411) is computed separately:
NIIT = 3.8% × min(net investment income, modified AGI − threshold)
Thresholds: $200,000 single, $250,000 married filing jointly, $200,000 head of household. They are fixed in law and not adjusted for inflation, so a large sale in one year can trigger NIIT even on a moderate income. Modified AGI is taken equal to AGI. Retirement-plan withdrawals are not investment income but raise modified AGI.
State tax is your own flat-rate assumption, applied to investment income (and, in the retirement comparison, to the 401(k)'s tax saving and withdrawals). Real state rules vary widely.
Tax years after 2026
Official figures exist for 2026 only. For later years, the 2026 dollar thresholds, standard deduction and contribution limits are raised by your inflation assumption each year; rates are unchanged and IRS rounding is not reproduced. These years are labelled projection in the results and are never presented as IRS figures; future laws may change. Your other income is assumed to grow with the same inflation. When the IRS publishes a new year, it replaces the projection.
Market scenarios
The investment calculator can run 1,000 scenarios in which only the monthly price return varies; each scenario goes through the same yearly dividend tax and lot-by-lot sale. Each month's growth factor is lognormal, calibrated so that the average annual return equals your return:
1 + R_month = exp(μ + σ_m × Z), σ_m = σ / √12, μ = ln(1 + r) / 12 − σ_m² / 2
σ is the annual volatility you enter: InvestMA has no verified US market data, so it suggests no value. The draws are reproducible. Results show the final net amounts reached by 10%, 50% and 90% of scenarios and the share ending below the total paid in. Past volatility does not predict future markets; months are independent (no long crises or extreme shocks).
Roth IRA vs Traditional 401(k)
- The same yearly amount goes into each option, monthly. Roth IRA and 401(k) balances grow without tax; the taxable account pays tax on dividends every year.
- Traditional 401(k) contributions are pretax. The tax they save each year (federal at your brackets plus your state rate) is invested in a taxable side account, so the three options cost you the same.
- In retirement, each account is drawn down in equal parts over the number of years you choose, with no further growth. Each year is taxed on top of the retirement income you enter: 401(k) withdrawals as ordinary income, taxable sales as gains (short-term lots become long-term after the first year), Roth withdrawals tax-free.
- Roth withdrawals are tax-free when qualified: age 59½ or older and five tax years since the first contribution. Retiring before 59½, or before the five years, is not supported and is shown as such rather than computed.
- Limits are checked for the first year: 401(k) $24,500 (+$8,000 from age 50, $11,250 instead at 60–63), capped at your income; IRA $7,500 (+$1,100 from 50), reduced across the Roth phase-out ($153,000–$168,000 single, $242,000–$252,000 joint, same as single for head of household) with your income as modified AGI. IRS rounding of the reduced limit is not applied.
- Not modelled: employer match, required minimum distributions, how Social Security becomes taxable, the Roth catch-up requirement for higher earners (flagged when it may apply), Traditional IRA deductibility limits.
Inflation and goal
The inflation calculator and goal planner use the same formulas as InvestMA Morocco, in dollars:
amount_needed = amount_today × (1 + inflation)^years
contribution = [goal − C₀ × (1 + r)^n] / {[((1 + r)^n − 1) / r] × (1 + r)}
The goal planner uses a return net of fees and taxes that you enter; it computes neither fees nor taxes.
IRS rules on file
Tax year 2026, verified on 10/24/2026. Sources: Rev. Proc. 2025-32, sections 4.01 (brackets), 4.03 (capital gains), 4.14 (standard deduction); IRS Notice 2025-67 (retirement limits); IRC §1(h). Statutory rules: IRC §1411 (NIIT), IRC §1211(b), §1212(b); IRS Publication 550.
Ordinary income brackets (taxable income)
| Rate | Single | Married filing jointly | Head of household* |
|---|---|---|---|
| 10% | $0 – $12,400 | $0 – $24,800 | $0 – $17,700 |
| 12% | $12,400 – $50,400 | $24,800 – $100,800 | $17,700 – $67,450 |
| 22% | $50,400 – $105,700 | $100,800 – $211,400 | $67,450 – $105,700 |
| 24% | $105,700 – $201,775 | $211,400 – $403,550 | $105,700 – $201,750 |
| 32% | $201,775 – $256,225 | $403,550 – $512,450 | $201,750 – $256,200 |
| 35% | $256,225 – $640,600 | $512,450 – $768,700 | $256,200 – $640,600 |
| 37% | over $640,600 | over $768,700 | over $640,600 |
Long-term gains and qualified dividends
| Rate | Single | Married filing jointly | Head of household* |
|---|---|---|---|
| 0% | $0 – $49,450 | $0 – $98,900 | $0 – $66,200 |
| 15% | $49,450 – $545,500 | $98,900 – $613,700 | $66,200 – $579,600 |
| 20% | over $545,500 | over $613,700 | over $579,600 |
* Rule to be verified. Head-of-household figures (brackets, standard deduction, capital-gains breakpoints) come from secondary sources quoting Rev. Proc. 2025-32 and are not verified yet. Sources differ on the 24% and 32% bracket edges ($201,750 / $256,200 used here vs $201,775 / $256,225).
Official IRS pages: irs.gov/irb/2025-45_IRB, irs.gov/irb/2025-49_IRB, irs.gov/newsroom/401k-limit-increases-to-24500-for-2026-ira-limit-increases-to-7500.
Return assumptions
The types of investment offered are teaching assumptions, not market data or forecasts. Every value can be changed.
| Type of investment | Assumed price return | Qualified dividends |
|---|---|---|
| Money market fund | 3% / year | 0% |
| Bond fund | 4% / year | 0% |
| Balanced fund | 5% / year | 50% |
| Stock index fund | 7% / year | 100% |
PDF and Excel exports
The investment calculator and the retirement comparison export a PDF report (cover, executive summary, detailed results, assumptions, rules) and an Excel workbook (.xlsx). The workbook has a summary sheet (results, assumptions, notes, IRS rules) and the detail: one row per month and taxes by year for the calculator, yearly balances of each account for the retirement comparison. Amounts are real numbers at full precision, shown in dollars with two decimals; dates are real dates (MM/DD/YYYY). Totals come from the same figures as the screen.
Limitations
- Federal tax for Single, Married filing jointly and Head of household only (not Married filing separately or Qualifying surviving spouse); standard deduction only.
- No AMT, tax credits, itemized deductions or special gain categories (collectibles, real estate).
- Constant return, dividend yield and inflation in the main results. Market scenarios (investment calculator) vary only the price return, with a volatility you enter: no US reference is suggested.
- No market data and no real fee schedules.
- See also the investment calculator and the retirement comparison.