Skip to content

Opportunity cost calculator for assets with different terms

To compare holdings that have different terms, restate each one as what the same money would have become at one baseline rate over that holding’s own term, then subtract. The difference is the opportunity cost. AlcorFinance does this for up to 20 holdings at a time, in your browser, and shares its page with a loan calculator and a break-even calculator.

AlcorFinance opportunity cost calculator with three example holdings and a 10% baseline, showing the baseline ahead by $184,736.05

You can type into the live version at /finance/, or open it from the dock of the AlcorOS desktop. Every figure in this post was produced by running the calculator’s own math file on its default example.

The problem

A rate on its own settles little when two holdings do not share a horizon. Take two rows from the example set: $50,000 of T-Bills at 4.8% for two years, and $250,000 of real estate at 6.5% for ten. The T-Bills grow to $54,915.20. The real estate grows to $469,284.37. Comparing 4.8% with 6.5% says little about those two positions, and comparing $54,915.20 with $469,284.37 says less.

What makes them comparable is a common alternative. Set each holding beside what the same principal would have done at one baseline rate over that same term, and each row becomes one subtraction. At a 10% baseline, the real estate’s alternative is $648,435.62, so holding it costs $179,151.25, which is 27.63% of the baseline outcome. The T-Bills’ alternative is $60,500.00, so they cost $5,584.80, or 9.23%. The small position and the large one are now on the same scale.

What the page does

For each holding you enter a name, an amount, a yearly rate and a term in years. Each row shows what the holding grows to, what the same amount grows to at the baseline, the difference, and the gap, which is the difference as a share of the baseline outcome. The baseline is recomputed over each row’s own number of years, so a two-year instrument and a ten-year one sit in the same table.

Above the table, a headline states who comes out ahead and by how much, with four figures beside it: what you put in, what the holdings grow to, what the baseline grows to, and the average rate. On the example set at 10%, the headline reads “The baseline comes out ahead by $184,736.05”.

The baseline is a number you type, not market data. The page suggests using the return you would expect from your fallback option, such as an index fund. Everything recomputes as you type. Dropping the baseline from 10% to 6.5% takes the real estate row’s cost to $0.00 because the two rates now match, takes the T-Bills row to $1,796.05, and turns the Stocks row to -$71,660.50. The total flips to -$69,864.45, and the headline changes to say the holdings come out ahead. Rows where the holding beats the baseline get a different color from rows where it trails, so the direction shows at a glance, and a holding that comes out ahead shows a negative cost.

You can add a holding, remove one, or load the three-row example (Real Estate, T-Bills and Stocks) back in. A scenario is saved in the page address, so copying the link shares it. You can also download the results as a CSV or print a clean copy.

The same page has two more calculators. The loan calculator works out a fixed-rate monthly payment and the full schedule, by year or by payment. Its default of $300,000 at 6% over 30 years gives $1,798.65 a month, $347,514.57 of interest and $647,514.57 paid in total over 360 payments. The break-even calculator takes fixed costs, a price and a cost per unit. Its defaults, $10,000 of fixed costs, a $50 price and a $30 cost, give 500 units, or $25,000 in sales, and it shows profit at 0, 250, 500, 750 and 1,000 units.

How it works

The math is one file of pure functions with no access to the page, the network, storage or the clock, so the same file runs in the browser and in Node. Growth is one line of compound interest, principal times (1 plus rate divided by 100) to the power of years, applied twice per row: once at the holding’s rate and once at the baseline. Opportunity cost is the second result minus the first. The gap is that difference divided by the baseline outcome, with a guard against dividing by zero.

The loan schedule is built in whole cents, with display rounding spread across the payments so the rows add up, which means individual payments can vary by a few cents. The break-even count rounds up, because you cannot sell part of a unit.

The scenario lives in the part of the address after the #, which browsers do not send to a server. Holding names, typed numbers and anything read from a link reach the page only as text, never as HTML. A few limits keep a shared link sane: 20 holdings, a link of at most 4,096 characters, rates from 0 to 100%, and terms of up to 100 years for growth or 50 years for a loan.

The page is a standalone document. It does not load analytics or ad tags, and its content security policy forbids network connections and form submissions, so the browser itself enforces that what you type stays on your device. CSV cells that a spreadsheet could read as a formula are prefixed with an apostrophe.

What it does not do

  • Growth compounds once a year and loans are fixed-rate with monthly payments. There is no compounding-frequency setting.
  • There is nowhere to enter taxes, fees, inflation, contributions, withdrawals, property tax, insurance or lender fees. The model is compound growth and nothing more.
  • No market data is involved. The baseline is a number you supply, and nothing the page prints is a forecast.
  • The average rate is weighted by amount and ignores term. A two-year and a ten-year holding of equal size count equally.
  • The totals add values reached in different years. Read them as each holding against its own alternative, not as one portfolio value on one date.
  • Nothing is saved or stored. Close the tab and the scenario is gone unless you kept the link, and the link carries your numbers in plain sight, so treat it like the figures it contains.
  • It is an estimating tool, not financial, tax or legal advice.

If you want one for your business

If you have a calculation that lives in a spreadsheet only one person can drive, we can build it into a tool your team can use, on its own page or inside your WordPress site. Look at what we build for operations, or get a written quote.

Share this article

← Back to all articles