How we calculate
How QuantRidge calculates your numbers
The rules the product follows when it works out a gain, a cost basis, a wash sale or a tax figure, and what it does when the information it needs is not there. Each rule here is written down so that you can check it against what you see on screen.
Four rules behind every QuantRidge figure
- Rule 1Computed by tested codeDeterministic engines produce the number. A language model only explains it.
- Rule 2A gap is shown as a gapUnknown is “—” or “Not recorded”, never $0.00.
- Rule 3Every account you addedWash sales are checked across your taxable accounts and IRAs alike.
- Rule 4Sourced, year by year2025 and 2026 parameter files, each value with its source.
- Figures produced by a language model
- None
- AI only explains figures the engines computed
- Tax arithmetic
- Whole cents
- Rounding is decided by a rule
- Wash-sale window checked
- 61 days
- 30 days before a loss sale, the sale day, 30 days after
- Tax years covered
- 2025, 2026
- Any other year is refused, not estimated
1 · The rules behind every number
How QuantRidge calculates: figures come from code, AI only explains them
Every figure in QuantRidge (a gain, a cost basis, a disallowed loss, a tax estimate) is produced by a calculation engine: ordinary code, written to published rules and covered by automated tests. Tax arithmetic is done in whole cents, so rounding is decided by a rule rather than by how a computer happens to store a fraction.
- Same inputs, same outputs. The tax and cost-basis engines are deterministic. Run the same holdings, sales and tax year through them twice and you get the same figures twice.
- No number comes from a language model. Where QuantRidge uses AI, the model is handed figures the engines have already computed and asked to explain them in plain words. It is told that a number not in front of it does not exist.
- An explanation that breaks the rules is withheld. AI replies about tax are checked for wording that reads as advice. A reply that fails is not shown. The figures are unaffected, because they never came from the model.
- Some explanations may be cached. When the same request was answered recently, the earlier written explanation may be served again. The figures are computed separately, so a cached explanation does not change a number.
Your figures are computed from your data only; how accounts are kept apart from one another is described on our security page.
2 · Missing data is shown as missing
A gap is reported, never filled with a zero
A zero is a claim. A cost basis of $0.00 says the shares were free, which turns their entire market value into a taxable gain on every screen that uses it. So when QuantRidge does not know a value, it stores it as unknown and shows it as unknown: a dash (—) or a label such as “Not recorded”.
- “Not assessed” is not “no risk”. A wash sale needs a loss, and a loss needs a cost basis. Where the basis is unknown there is no loss to measure, so the check reports that it could not be done rather than reporting that everything is fine.
- An unknown date stays unknown. A sale with no acquisition date is shown as unclassified rather than guessed to be short-term, and a lot with no purchase date shows “Holding period unknown”.
- A missing price is not a price of zero. A sale cannot be recorded at $0.00; a missing sale price is refused rather than recorded as a loss of the whole cost.
- A partial total says it is partial. Where some holdings have no basis on file, a total covers the ones that do and says how many shares it leaves out.
- Too little history is said out loud. A statistic that would need more data than there is says so, instead of being computed from a handful of points.
3 · Tax lots and cost basis
Tax lots and cost basis: where your basis comes from, and when there is none
A cost basis reaches QuantRidge in one of three ways:
- From a brokerage connection, where the brokerage reports it. Some connections report no basis at all; those positions arrive with the basis unknown.
- From a file you import. A holdings file without a cost column is still imported (the shares are worth having) and the import tells you how many rows arrived without a basis.
- From you, typed in on the position. That is also how a missing basis gets fixed.
Partial basis gives no figure
If any of the shares in a sale have no basis on file, the sale preview shows no cost total and no gain or loss, and tells you how many shares need a basis. A gain that covered only some of the shares would otherwise be recorded as the gain on all of them. Averages are taken only over the lots whose basis is known, because averaging an unknown lot in at zero would quietly overstate the gain.
Holding period
It is counted from the day after the shares were acquired through the day they are sold, using calendar dates rather than a 365-day approximation. A sale is long-term when that period is more than one year. The engine treats inherited shares as long-term whatever the dates.
Choosing tax lots before a sale
Before a sale, QuantRidge can compare which lots first-in first-out, highest-cost-first, a lot list you pick, and a lowest-estimated-tax ordering would sell. Choosing specific lots is an instruction you give your broker by settlement; QuantRidge does not send it.
3 · Tax lots and cost basis, continued
Cost basis mismatch: why a figure can differ from your broker’s
The same shares, described from different information. Each of these can move a QuantRidge figure without moving the one on your broker's Form 1099-B, or the other way round.
Five reasons a QuantRidge figure and a 1099-B can disagree
Your records
- What you paid for each lot, adjusted for everything that has happened since.
- Covers every account you hold.
Where the two can part company
- A different basis on fileMissing, entered by hand, or taken from a different source.
- A different lot methodYour broker relieves lots by a different method from the one assumed here, so a different set of shares is counted as sold.
- Wash sales across accountsA broker generally adjusts for wash sales it can see inside that one account. QuantRidge looks across the accounts you have added, so it can find a replacement purchase the broker could not.
- Transfers from another brokerShares transferred in can arrive without their original basis.
- Reinvested dividendsEach one is a purchase that opens a new lot with its own date and cost.
Broker’s 1099-B
- Box 1e, cost or other basis: what this broker knows.
- Box 1g, wash sale loss disallowed: same-account wash sales only.
- Basis is required only for covered shares.
More on this in why your cost basis does not match your broker's.
4 · Wash sales
The wash-sale rule, exactly as QuantRidge applies it
Under section 1091 of the Internal Revenue Code, a loss on a sale is disallowed to the extent that substantially identical shares are bought within 30 days before or after it. The rule applies to losses only: a sale at a gain is never affected, and buying back after a gain does not disallow anything.
Which purchases count
- Purchases in the accounts you have added to QuantRidge: taxable accounts and IRAs alike, before and after the sale.
- Dividend reinvestments, which the IRS treats as purchases.
- Not the shares being sold. A lot cannot replace itself, even when only part of it is sold.
Accounts you have not added cannot be checked
The rule reaches your household (your own accounts, your spouse's, and your IRAs), but QuantRidge only sees what you have connected or entered. A purchase in a workplace plan, a spouse's account held elsewhere, or a brokerage you have not linked is outside the check, and the result does not cover it.
4 · Wash sales, continued
The 61-day wash-sale window, with a taxable purchase and an IRA purchase
The window is 61 calendar days: the 30 days before a sale, the day of the sale, and the 30 days after. A sale at a loss is checked for purchases of the same security anywhere in that window, in the accounts you have added to QuantRidge.
Example: one sale at a loss, purchases in two accounts
- Window opens · day −30
Bought 20 shares
Day −12 · Taxable account
In the window
- Sale at a loss · day 0
Dividend reinvested
Day +9 · Taxable account
In the window
Bought 30 shares
Day +18 · IRA
In the window · permanent
- Window closes · day +30
Bought 25 shares
Day +36 · Taxable account
Outside the window
- Purchase inside the window
- Inside the window in an IRA or 401(k): permanent
- Purchase outside the window
- Sale at a loss, day 0
4 · Wash sales, continued
How a match is worked out, and the IRA rule (Rev. Rul. 2008-5)
- Replacement purchases are matched to the loss earliest-first, share for share. The disallowed part of the loss is in proportion to the shares matched.
- Matching is done in whole shares. Fractional-share lots are left out of the check, and the screen says so. Sales with no acquisition date are left out too, because the window needs both dates.
In a taxable account the loss is deferred, not lost
The disallowed amount is added to the cost basis of the replacement shares, and the holding period of the shares sold carries over to them (sections 1091(d) and 1223(3)).
Wash sale in an IRA: the loss is gone for good
When the replacement is bought in an IRA or Roth IRA, the loss is disallowed and the IRA's basis does not increase (Revenue Ruling 2008-5). The ruling names IRAs. QuantRidge applies the same treatment to a replacement in any other tax-deferred or tax-free account you have added, such as a 401(k), because there is no published IRS rule for those accounts either way. Confirm that case with a tax professional.
Flagged, or warned
Flagged as a wash sale
A purchase of the same security inside the window. The disallowed amount is shown, and any part that is permanent because the purchase was in an IRA is identified as permanent.
Raised as a warning
A fund that tracks the same index through a different issuer. It is not treated as substantially identical, because the IRS has not published a rule on it, but it is pointed out so that you or a tax preparer can decide.
More on this in wash sales across accounts and IRAs.
5 · Tax parameters by year
Tax parameters by year: one file per year, every value with its source
Brackets, thresholds, limits and windows come from a parameter file for each tax year. QuantRidge covers 2025 and 2026. A different year is refused rather than estimated from the nearest one.
- Every value records where it came from (a section of the Internal Revenue Code, an IRS publication or revenue procedure, or another official source) and whether it has been checked against that source.
- A value that has not been confirmed against a primary source is marked. A figure that depends on one is either not produced, or is shown with the label “needs verification” and is not presented as final. New York state figures carry that label today.
- A figure that depends on a threshold not yet published for a future year is labelled a projection.
- The files reflect the law as of the date they were prepared, including the 2025 changes made by Public Law 119-21. When the law or the IRS figures change, the file changes, and so do the results.
6 · Market data and “as of” dates
Market data and “as of” dates: a price is a reading taken at a moment
Prices, company data and news come from market data providers; company filings come from the SEC's public EDGAR system. Each provider is named on our subprocessors page.
- A price can be delayed, and some price history is end-of-day closing prices rather than intraday quotes.
- Tax results show the date they were computed, so you can tell how old a figure is. A market value is only as current as the price behind it.
- A gain needs both a price and a basis. Without either, there is no gain figure.
7 · What QuantRidge does not do
What QuantRidge does not do: the edges of the tool
Not an adviser, broker-dealer or tax preparer
QuantRidge is not a registered investment adviser, broker-dealer or tax preparer, and it does not give tax, legal or investment advice. Its results are educational estimates.It never holds your money or securities
Account connections are read-only, so it cannot place trades or move money.No tax filing, no broker instructions
It does not file tax returns or send instructions to your broker.It knows only what it has been given
Results depend on the accounts, holdings and dates you have added, and on the law as of the date shown.
Before acting on a tax figure, check it with a qualified tax professional, who can see the parts of your situation that QuantRidge cannot. See our legal disclosure and editorial standards.
If you find a figure that does not follow the rules on this page, tell us at support@quantridge.net. A specific example gets fixed fastest.
Questions
Questions about how QuantRidge calculates
Does AI produce the numbers in QuantRidge?
No. Every figure comes from tested calculation engines that give the same output for the same input. AI is only asked to explain figures it was handed, never to produce them.
What happens when a cost basis or price is missing?
It is shown as missing, with a dash, and the figures that depend on it say “not assessed” rather than showing a zero. A silent zero would read as a fact.
Which accounts does the wash-sale check cover?
The accounts you have added to QuantRidge, IRAs included, looking 30 days before and after each sale at a loss. Accounts you have not added cannot be checked.
Which tax years are covered?
Tax years 2025 and 2026. Any parameter that still needs verification is labelled “needs verification” wherever it is used.
Is QuantRidge tax or investment advice?
No. QuantRidge is software. It is not a registered investment adviser, it does not hold your assets or place trades, and its figures are not tax advice. Check decisions with a tax professional.
Try it
Check the rules on your own numbers
The harvest check and the wash-sale calculator, to try the window on your own numbers, and four guides that go further into the rules on this page.
Free tool
Harvest check
Free, runs in your browser, and needs no sign-up. A quick look at possible tax-loss harvesting and wash-sale conflicts.Calculator
Wash-sale and harvest calculator
Work through a sale at a loss and see how the 61-day window applies to purchases around it.Guide
Wash sales across accounts and IRAs
Why purchases in your other accounts, a spouse’s accounts and an IRA count, and what a 1099-B does not show.Guide
Why your cost basis does not match your broker’s
The ordinary reasons your records and a 1099-B disagree, and what to do about each.Checklist
The 2026 tax-loss harvesting checklist
Step by step before December 31, 2026, from checking every account to the records a tax preparer will need.Guide
Tax-loss harvesting has two seasons
December, and again when 1099-Bs arrive: reconciling sales against your own lot records.