Did your portfolio beat the S&P 500?

Enter the money you put in and took out, each with its date, and your portfolio’s value on a recent date. The calculator puts the same amounts into the S&P 500 on the same dates, dividends reinvested, and shows which came out ahead: in money and as a rate per year.

Your deposits and withdrawals

One row per transfer between your bank and the investment account. Leave out buys, sells and dividends that stayed in the account. The example is filled in so you can see a result; replace it with your own numbers. Use US dollars, as the index is in dollars.

What your portfolio is worth

The whole account, cash included. Each month’s index level is the average of its daily closes, so it matches a mid-month value best. The data runs through September 2026: the closest match is your account’s value on 15 September 2026, or the nearest trading day. A month-end value can sit several percent away from that month’s average.

You vs the S&P 500

Difference

—

—

Your portfolio minus the same deposits in the S&P 500

Your portfolio

—

Value you entered

Same deposits in the S&P 500

—

Dividends reinvested

Your rate per year

—

Money-weighted (XIRR)

S&P 500 rate per year

—

Same flows, same dates

    S&P 500 total return, monthly averages, January 1970 to September 2026. Source: Robert Shiller’s stock market data.

    Worked out in your browser. What you type is not sent anywhere and not saved.

    Why your % against the index’s % is an unfair test

    The S&P 500’s return for a period assumes one lump of money went in on the first day and stayed. Your account almost never works like that. You added money over months or years, and maybe took some out. Each deposit only lived through part of the period.

    Here are three investors who held nothing but the S&P 500, dividends reinvested. Each put in 20,000. The only difference is when. All three accounts are valued on 15 September 2026.

    Three investors, same index, different deposit dates, valued on 15 Sep 2026
    InvestorDepositsWorthTotal returnReturnRate per yearPer year
    A20,000 Jan 202220,000 on 14 Jan 202235,787+78.9%+13.27%
    B5,000 Jan 2022
    15,000 Oct 2022
    5,000 on 14 Jan 2022
    15,000 on 14 Oct 2022
    41,510+107.5%+19.39%
    C5,000 Jan 2022
    15,000 Jan 2025
    5,000 on 14 Jan 2022
    15,000 on 15 Jan 2025
    28,572+42.9%+15.05%

    Over the same stretch, from January 2022 to September 2026, the index itself returned +78.9%. Hold each investor’s total return up against that figure and B looks 29 points ahead, while C looks 36 points behind. Both conclusions are wrong. Each of them owned the index and nothing else, so each matched it exactly.

    B put most of the money in during October 2022, near the low of that year’s fall. C put most of it in at the start of 2025, so it had less than two years to grow. That is timing, and it shows up in their own results. It says nothing about whether they picked better or worse than the index.

    The rate per year has the same flaw. From January 2022 to September 2026 the index grew 13.27% a year. That is exactly A’s rate, because A made one deposit at the start. B’s 19.39% and C’s 15.05% differ from it only because of when the money went in. Set your own rate per year against the S&P 500’s annual return for the same years and you repeat the mistake: B would seem to beat the index by 6 points a year while holding nothing else.

    The fair test keeps the timing and swaps the investment. Take your own deposits and withdrawals, put the same amounts into the S&P 500 on the same dates, and see what that would be worth on your value date. The calculator also works out the index’s rate per year on those same flows. That tile, the S&P 500 rate per year, is the one to set your own rate against. Run B or C through the calculator above and the difference comes out at about zero, as it should: within a dollar, because the table rounds to whole dollars.

    How the calculator mirrors your deposits

    1. Each deposit buys the index. 10,000 deposited when the index stands at 18,639.4 buys 0.5365 units of it.
    2. Each withdrawal sells it. Taking out 4,000 sells 4,000 worth of units at that month’s level.
    3. Dividends are reinvested. The index level already includes them, so the units grow with price and dividends together.
    4. The units are valued on your value date. That is what the same money would be worth had it gone into the S&P 500 instead.

    The calculator then works out two rates per year with the same method as the XIRR calculator for your money-weighted return: one from your deposits, withdrawals and portfolio value, and one from the same deposits and withdrawals with the index version’s value at the end. Both use the same dates, so the gap between them is the part of your result that timing cannot explain.

    difference = your portfolio value − value of the same flows in the S&P 500

    A positive difference means your choices beat simply buying the index with each deposit. A negative one means the index would have left you with more.

    Dividends: compare with the total return

    The S&P 500 figure quoted in the news is usually the price index. It leaves out the dividends the companies pay, and over long periods they add up. From September 2006 to September 2026, using monthly averages:

    • The price alone grew 5.82 times, about 9.2% a year.
    • With dividends reinvested it grew 8.43 times, about 11.2% a year.

    Your portfolio’s value already includes the dividends you received, as long as they stayed in the account. Compare it with the price index and you give yourself a head start of about two points a year. That is why this calculator uses the total return series.

    If you track dividend income on its own, the dividend tracker for iPhone shows it per month and per year.

    Worked example: four deposits

    This is the example loaded in the calculator. An investor made four deposits between March 2021 and June 2024, 28,000 in total, and never withdrew. On 15 September 2026 the account is worth 48,000. That is 20,000 made, +71.4% on the money put in.

    The index level below is a total return index, set to 100 in January 1970, at each month’s average. In September 2026 it stood at 39,447.3.

    The same four deposits put into the S&P 500
    DateDepositIndex levelWorth on 15 Sep 2026
    15 Mar 202110,00018,639.421,163.40
    14 Jan 20225,00022,045.38,946.87
    14 Oct 20225,00018,171.410,854.23
    14 Jun 20248,00027,100.911,644.57
    Total28,00052,609.07

    Each row is the deposit times the September 2026 level divided by the level in the month of the deposit. The first one: 10,000 × 39,447.3 ÷ 18,639.4 = 21,163.40.

    • Your portfolio: 48,000, a rate of +13.51% a year.
    • The same deposits in the S&P 500: 52,609.07, a rate of +15.92% a year.
    • Difference: 4,609.07 behind, or 2.40 percentage points a year (the gap is taken before the two rates are rounded).

    A +71.4% gain feels like a win, and it is a good result in its own right. It still trails what the index would have done with the same money on the same days. Compare the headline instead: the index rose 111.6% from March 2021 to September 2026. Against that, this investor seems to trail by 40 points, which overstates the gap by a wide margin because most of the money went in after March 2021.

    What this test leaves out

    • Monthly data. Each month has one level: the average of its daily closes. That has two effects. A deposit on 3 March and one on 28 March both buy at March’s average; across years of deposits these small errors mostly even out. Your end value is different, because the whole balance is set against one monthly average. In September 2022 the S&P 500 averaged 3,850.52 but closed the month at 3,585.62, about 7% lower. A portfolio of nothing but the index, valued on 30 September 2022, would have come out about 7% of its balance behind the index here, from the date alone. That is why the calculator asks for a mid-month value.
    • Data through September 2026. A deposit or value dated later is priced at September 2026’s level, so the index side misses any move since then. The calculator flags it.
    • Dividends are smoothed. The source spreads each year’s dividends evenly across the months. Its dividends run through June 2026; for July to September 2026 the calculator carries June’s dividend rate forward.
    • No fees or taxes. The index side pays no trading costs and no tax on dividends. If your account paid both, a small gap in the index’s favour is expected.
    • An index, not a fund. You cannot buy the index itself. A fund that tracks it charges a yearly fee and trails it slightly.
    • US dollars. The index is in dollars. Amounts in another currency mix exchange-rate moves into the difference.

    Is the S&P 500 the right yardstick?

    It is a fair test for a portfolio of mostly large US companies. If you also hold bonds, cash or shares from outside the US, a gap is expected, and most of it comes from that mix. A portfolio with bonds or cash should trail the S&P 500 in strong years and fall less in bad ones. The max drawdown calculator shows how deep your worst fall was. For a portfolio spread around the world, an All-World index is the closer match, and the Stock Stats app can compare with one.

    Stock Stats for iPhone

    Run every deposit against the S&P 500, Nasdaq 100 or All-World

    This page gives you one comparison for one date, from numbers you type in. The app does it from your real ledger. In Stock Stats, the “vs the market” card runs the S&P 500, Nasdaq 100 or an All-World index through your own cash flows (same amounts, same dates), so your timing is matched like for like.

    • Daily prices instead of monthly averages, from funds that track each index, so the fund’s own costs are in the comparison.
    • Holdings in other currencies are converted to your base currency with daily exchange rates.
    • Bring transactions in by Interactive Brokers sync with a read-only Flex token, by CSV import, or by hand.
    • No account. Your portfolio stays on your iPhone.
    Download on the App Store

    Questions about comparing with the S&P 500

    How do I compare my portfolio to the S&P 500?

    Put the S&P 500 through the same deposits and withdrawals you made. Each deposit buys the index in the month you made it, at that month’s average level. Each withdrawal sells it the same way, and dividends are reinvested. Then set what that index version was worth on your value date against your portfolio’s value on that date. The calculator on this page does this in your browser.

    Why not compare my return with the S&P 500’s return for the same years?

    The index’s figure assumes all the money went in on the first day. If you added money over time, part of your money missed the early years, good or bad. Someone who held nothing but the S&P 500 can look far ahead of it or far behind it on that measure. Running your own deposits through the index removes the timing from the test.

    My rate per year is higher than the S&P 500’s annual return. Did I beat it?

    Not necessarily. The index’s annual return assumes one deposit at the start. Your rate per year depends on when your money went in, so someone who held only the S&P 500 can show a rate well above or below the index’s own. Compare your rate with the index’s rate on your own deposits and dates. That is the S&P 500 rate per year the calculator shows.

    Does the comparison include dividends?

    Yes. The index side reinvests the S&P 500’s dividends every month, as you would in an accumulating fund. Your side should include dividends too: if they stayed in the account, they are already in its value. If they were paid out to your bank, enter each one as a withdrawal.

    Why does the calculator ask for withdrawals?

    Money you took out is money you no longer had invested. The index version sells the same amount on the same date, so both sides end up with the same money in and out. If you leave a withdrawal out, the index side keeps that money invested and looks better than it should.

    My account is in euros or pounds. Can I still use it?

    The S&P 500 here is in US dollars. For a clean test, enter your deposits, withdrawals and value in dollars, each converted at the rate on its date. If you enter amounts in another currency, the difference will also contain that currency’s moves against the dollar, which have nothing to do with what you picked.

    How current is the S&P 500 data?

    It runs from January 1970 through September 2026, one value per month, from Robert Shiller’s public stock market data. Each month uses the average of that month’s daily closes, which matches a mid-month portfolio value best. A deposit or value dated after September 2026 is priced at September 2026’s level, and the calculator tells you when that happens.

    The data comes from the U.S. stock market data set that Professor Shiller links from his Yale page: monthly S&P Composite prices and dividends since 1871. The file used here was last updated in October 2026.

    Is anything I enter stored or sent?

    No. The calculation runs in your browser, with the index data built into the page. The dates and amounts you type are not sent anywhere and are not saved. Reloading the page brings back the example.