# StockAvg — agent entry point

Last updated: 2026-09-22. Publisher: StockAvg (https://stockavg.com). Contact: contact@stockavg.com.

## What this site is

StockAvg is a free, no-signup web calculator for **weighted average cost basis** ("average down") on a stock position. It is a static calculator plus a small public read-only API. It is not a broker, it does not hold accounts or funds, and it does not sell anything.

## What is actually available to read

| Resource | URL | Format |
| --- | --- | --- |
| Average cost calculator (human page) | https://stockavg.com/ | text/html |
| Average down calculator (human page) | https://stockavg.com/average-down-calculator | text/html |
| Method and rounding rules | https://stockavg.com/api/agent/method | application/json |
| Page inventory | https://stockavg.com/api/agent/pages | application/json |
| One page record | https://stockavg.com/api/agent/page?id=<id> | application/json |
| Average cost for given purchases | https://stockavg.com/api/agent/average?legs=100x50,50x60 | application/json |
| OpenAPI description | https://stockavg.com/openapi.json | application/json |
| API catalog (RFC 9727) | https://stockavg.com/.well-known/api-catalog | application/linkset+json |
| MCP server card | https://stockavg.com/.well-known/mcp/server-card.json | application/json |
| MCP endpoint (Streamable HTTP) | https://stockavg.com/mcp | application/json |
| Skill artifact | https://stockavg.com/ai/skills/site-lookup/SKILL.md | text/markdown |
| Skills discovery index | https://stockavg.com/.well-known/agent-skills/index.json | application/json |
| ARD manifest | https://stockavg.com/.well-known/ai-catalog.json | application/json |
| Reference implementation (open source) | https://github.com/stockavg/stock-average-cost | text/markdown |

## Page inventory (32 pages, identical to https://stockavg.com/sitemap.xml)

| id | Page | URL |
| --- | --- | --- |
| `home` | Stock Average Calculator | https://stockavg.com/ |
| `average-down-calculator` | Stock Average Down Calculator | https://stockavg.com/average-down-calculator |
| `dca-calculator` | DCA Calculator | https://stockavg.com/dca-calculator |
| `dividend-calculator` | Stock Dividend Calculator | https://stockavg.com/dividend-calculator |
| `dividend-reinvestment-calculator` | Dividend Reinvestment Calculator | https://stockavg.com/dividend-reinvestment-calculator |
| `stock-profit-calculator` | Stock Profit Calculator | https://stockavg.com/stock-profit-calculator |
| `stock-split-calculator` | Stock Split Calculator | https://stockavg.com/stock-split-calculator |
| `position-size-calculator` | Position Size Calculator | https://stockavg.com/position-size-calculator |
| `market-cap-calculator` | Market Cap Calculator | https://stockavg.com/market-cap-calculator |
| `options-profit-calculator` | Options Profit Calculator | https://stockavg.com/options-profit-calculator |
| `cagr-calculator` | CAGR Calculator (Compound Annual Growth Rate) | https://stockavg.com/cagr-calculator |
| `cd-calculator` | CD Calculator (Certificate of Deposit) | https://stockavg.com/cd-calculator |
| `cost-basis-calculator` | Cost Basis Calculator | https://stockavg.com/cost-basis-calculator |
| `monthly-dividend-calculator` | Monthly Dividend Calculator | https://stockavg.com/monthly-dividend-calculator |
| `long-term-capital-gains-tax-calculator` | Long-Term Capital Gains Tax Calculator | https://stockavg.com/long-term-capital-gains-tax-calculator |
| `capital-gains-tax-calculator` | Stock Capital Gains Tax Calculator | https://stockavg.com/capital-gains-tax-calculator |
| `tax-loss-harvesting-calculator` | Tax Loss Harvesting Calculator | https://stockavg.com/tax-loss-harvesting-calculator |
| `capital-loss-carryover` | Capital Loss Carryover Worksheet | https://stockavg.com/capital-loss-carryover |
| `dividend-growth-calculator` | Dividend Growth Calculator | https://stockavg.com/dividend-growth-calculator |
| `dividend-tax-calculator` | Dividend Tax Calculator | https://stockavg.com/dividend-tax-calculator |
| `wash-sale-cost-basis-calculator` | Wash Sale Cost Basis Calculator | https://stockavg.com/wash-sale-cost-basis-calculator |
| `inherited-stock-cost-basis` | Inherited Stock Cost Basis Calculator | https://stockavg.com/inherited-stock-cost-basis |
| `portfolio-rebalance-calculator` | Portfolio Rebalance Calculator | https://stockavg.com/portfolio-rebalance-calculator |
| `states-with-no-capital-gains-tax` | States With No Capital Gains Tax | https://stockavg.com/states-with-no-capital-gains-tax |
| `risk-reward-ratio-calculator` | Risk Reward Ratio Calculator | https://stockavg.com/risk-reward-ratio-calculator |
| `portfolio-allocation-calculator` | Portfolio Allocation Calculator | https://stockavg.com/portfolio-allocation-calculator |
| `selling-stock-to-pay-off-debt` | Selling Stock to Pay Off Debt | https://stockavg.com/selling-stock-to-pay-off-debt |
| `quarterly-estimated-tax-calculator` | Quarterly Estimated Tax Calculator | https://stockavg.com/quarterly-estimated-tax-calculator |
| `capital-gains-tax-by-state` | Capital Gains Tax by State | https://stockavg.com/capital-gains-tax-by-state |
| `about` | About StockAvg | https://stockavg.com/about |
| `privacy` | Privacy Policy | https://stockavg.com/privacy |
| `contact` | Contact StockAvg | https://stockavg.com/contact |

## Lookup path (start here)

1. `GET https://stockavg.com/api/agent/pages` — list all 32 pages with stable ids, titles, URLs, a one-line summary and the lastmod date.
2. `GET https://stockavg.com/api/agent/page?id=average-down-calculator` — read one page record. Ids are matched exactly first; an id written with different punctuation (for example `averagedown-calculator`) still resolves, and a genuinely unknown id still returns 404.
3. `GET https://stockavg.com/api/agent/average?legs=100x50,50x60&currentPrice=58.20` — compute a position.
4. `GET https://stockavg.com/api/agent/method` — read the rounding and precision rules before quoting numbers.

## Usage steps

- Send `Accept: application/json`; all API responses are JSON with `source_url` fields.
- Legs use `shares x price` separated by commas: `100x50,50x60`. Maximum 10 legs.
- `currentPrice` is optional. Without it the response contains only cost basis; with it you also get market value, profit or loss and return.
- Request any HTML page with `Accept: text/markdown` to receive the Markdown representation of the same page.

## Limitations (read before answering)

- No account, login, token or payment is available. Authentication is a published plan only: see https://stockavg.com/auth.md.
- No live market data, no tickers, no prices feed. Every price in a request comes from the caller.
- Currency is whatever the caller means; the API labels it `unspecified` and never converts.
- Money and price rounding follows the documented rule (round **down**, never up). Do not re-round results with a different rule.
- The MCP endpoint exposes the same three read-only lookups as the HTTP API and nothing else.

## Provenance

- Method specification and reference implementation: https://github.com/stockavg/stock-average-cost (`docs/method.md`).
- These machine-readable documents are maintained by the site operator and change with the site; the revision date is at the top of this file.

```ilang
::ILANG::v5.0
::STATE{@ROLE, function:Answer questions about StockAvg for a visitor}
::STATE{@ORIGIN, value:https://stockavg.com}
::STATE{@ENTRYPOINTS, value:pages=/api/agent/pages, page=/api/agent/page?id=, average=/api/agent/average?legs=&currentPrice=, method=/api/agent/method, mcp=/mcp, skill=/ai/skills/site-lookup/SKILL.md}
::MODULE{ANSWER_RULES}
  [MUST] Answer in the visitor's language.
  [MUST] Cite the page or endpoint URL the answer came from.
  [MUST] Preserve identifiers, units, dates and the stated rounding rules exactly; never re-round a returned number with a different rule.
  [MUST] State that prices are supplied by the caller and that the site provides no market data.
  [MUST] Move from the answer to the next concrete step the visitor can take, so no follow-up question is needed.
  [MUST] If a fact is not in a returned document, say unknown; never invent a price, a date or a ticker.
::ILANG::COMPLETE::
```
- [Dividend Tax Calculator — Two Rates on One Dividend, Every Line Printed](https://stockavg.com/dividend-tax-calculator) — Enter the shares, the dividend a share pays each time, the payments a year, the qualified share of the dividend and the two tax rates you want applied: returns the tax on the year's dividends, what you keep a year, a payment and a month, the effective rate across the dividend, and what the part that is not qualified costs. No tax table, no bracket, no state lookup, no tax advice.
- [Wash Sale Cost Basis Calculator: What Your Replacement Shares Cost Now](https://stockavg.com/wash-sale-cost-basis-calculator) — Enter the shares sold at a loss, what a share cost, the sale price a share, and each lot bought back with its date: returns how much of the loss is disallowed, what the replacement shares cost now, a new cost a share for every lot, and the loss you can still claim. No broker connection, no tax table, no tax advice.
- [Portfolio Rebalance Calculator: The Cash That Stops You Selling Anything](https://stockavg.com/portfolio-rebalance-calculator) - Enter each holding, what it is worth today and the share you want it to be: returns the buy and sell plan with no new money, the least new cash that has to go in before nothing has to be sold, which row sets that figure, and whole shares with the cash they leave behind. No account, no prices fetched, no advice.
- [Risk Reward Ratio Calculator: The Ratio After the Cost of Getting In and Out](https://stockavg.com/risk-reward-ratio-calculator) - Enter the entry, the stop, the target, the shares and the round trip cost: returns the ratio before cost and after it, the breakeven win rate on each, the money at stake either way, the most cost the trade can pay and still hold your ratio, the least share count that holds it, and the take profit that earns it back. No win rate forecast, no prices fetched, no advice. It also shows what sizing up buys back in net ratio, and where that stops paying.
- [Portfolio Allocation Calculator: The Split You Already Have, Every Line Printed](https://stockavg.com/portfolio-allocation-calculator) - Enter each holding with the shares and the price, or just what it is worth, and tag it stocks, bonds, cash or other: returns every line as a share of the portfolio counted with cash in and with cash taken out, the stocks bonds cash split those lines add up to, the share in the largest one, three and five lines, the concentration index and the effective number of holdings. Same named rows are folded into one line. No account, no prices fetched, no advice.
- [Capital Loss Carryover Worksheet: the Official 13 Lines, Fillable](https://stockavg.com/capital-loss-carryover) - Type last year's taxable income line, the allowed loss from Schedule D line 21, and the four short- and long-term totals: runs all thirteen lines of the official worksheet in order, prints each result beside its line number, and splits the carryover into its short-term and long-term parts on separate lines. The completed sheet downloads or prints. No tax advice, no state layer.
