# Stock Average Calculator — REST API endpoint `stock-average-calculator`

Return the average cost per share (dollar cost averaging) across several buys, the total shares, total invested, break-even price, and, when a current price is given, the position value and unrealized profit or loss in money and percent.

- Category: calculators
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/stock-average-calculator/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/stock-average-calculator/
- Same tool on the other surface: https://findutils.com/mcp/stock-average-calculator/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/stock-average-calculator/execute \
  -H "Content-Type: application/json" \
  -d '{
    "transactions": [
      {
        "shares": 10,
        "price": 100
      },
      {
        "shares": 15,
        "price": 85
      }
    ],
    "current_price": 90
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/stock-average-calculator
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `transactions` | array | yes | Buys as { shares, price }. 1-500 items; both values must be > 0. |
| `current_price` | number | no | Current market price per share. Optional. |

Example arguments (verified):

```json
{
  "transactions": [
    {
      "shares": 10,
      "price": 100
    },
    {
      "shares": 15,
      "price": 85
    }
  ],
  "current_price": 90
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:stock_average_calculator`. Full MCP reference: https://findutils.com/mcp/stock-average-calculator/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
