---
name: tam-calculator
description: Count the total addressable market (TAM) of a B2B company from its website alone, as the companies that look like its current clients, in its geography, one contact each. Counts come from company registries (Sirene in France, LinkedIn industry data elsewhere), never from a model's guess. Use when the user asks for a TAM, a market size, how many companies or contacts they can target, whether a market is big enough for outbound, or gives a website and asks how big its market is. Runs `npx -y rivolt-tam acme.com --json`, with the company domain in place of acme.com, in 20 to 60 seconds.
license: MIT
---

# TAM calculator

The TAM here is a count of companies to reach, one contact each, not a market value in euros or dollars: the companies that look like the company's current clients, at their size, in the geography those clients prove. The whole website is read, not just the home page. It is the number that tells you whether outbound has enough room to work.

## Run it

```bash
npx -y rivolt-tam acme.com --json
```

- `--lang fr` returns the labels in French.
- Needs Node 18 or later and network access. No key, no sign-up.
- One run takes 20 to 60 seconds. Tell the user it is counting, then wait. Never start a second run for the same domain while one is going: the numbers would not move, only the wait.
- Several companies: run them one after the other, not in parallel.

## What comes back

| Field | Meaning |
|---|---|
| `tam` | The TAM: the number of companies, one contact each |
| `companies` | Sum of the counted segments |
| `contacts_per_company` | Always 1 |
| `pages_read` | Pages of the website read for the count |
| `niche` | The ICP the clients justify, in one paragraph |
| `geography` | Where, and what was not proven |
| `clients_seen` | Clients found on the site, the evidence for the ICP |
| `clients_in_registry` | Clients matched to their registry record (France): their real industry code sets the segment's code |
| `segments[]` | `label`, `filter` (registry codes and headcount bands), `companies`, `note` |
| `left_out` | What was deliberately not counted, and why |
| `next_question` | The question that would sharpen the number, to ask the company |
| `sources[]` | Pages read and registry queries, each with `label` and `url` |
| `seconds` | Run time |

## How to present it

1. Lead with the TAM and its definition in one line: "32,210 companies like your clients in France, at their size, one contact each."
2. Show the segments as a short table, label, filter, count. They are what makes the number defensible.
3. Say what was left out. A TAM without its exclusions reads as a promise.
4. End with `next_question`: it is the fastest way to a sharper number.
5. Link the sources when the user wants to check a count.

## Rules

- **Never change a number.** No rounding up, no adding a segment the tool did not count, no multiplying by a number of decision-makers. If the user wants a wider or narrower market, count it (below) and show both numbers side by side.
- **The narrowest ICP the clients justify, not the dream market.** A market the site does not prove is a hypothesis: name it as one.
- **At worst, never the median.** Between two counts, the prudent one.
- **Two runs can differ.** The segments are posed by a model reading the site, the counts come from the registry. If two runs disagree, compare their segments, not their totals.

## Counting a segment by hand

When the user wants a segment the tool did not pose, or the run fails twice.

**France**, Sirene through the free public API. One call per segment, `total_results` is the count:

```
https://recherche-entreprises.api.gouv.fr/search?activite_principale=62.01Z&tranche_effectif_salarie=11,12&etat_administratif=A&per_page=1
```

- `activite_principale`: NAF rev. 2 codes, comma-separated (`62.01Z`).
- `tranche_effectif_salarie`: INSEE headcount bands. `01` 1-2, `02` 3-5, `03` 6-9, `11` 10-19, `12` 20-49, `21` 50-99, `22` 100-199, `31` 200-249, `32` 250-499, `41` 500-999, `42` 1000-1999, `51` 2000-4999, `52` 5000-9999, `53` 10000+. Band `00` (no employee) is flooded with dormant entities: leave it out unless the clients are solo.
- The API stops at 10,000 results. Above that, split by code, then by band, then by `region`, and add the parts.
- Catch-all codes (`70.22Z`, `82.99Z`, `96.09Z`) stay out unless the clients prove them.
- About 7 calls per second at most.

**Elsewhere**, a published official count, cited: US Census SUSB and County Business Patterns (by NAICS and size class), UK ONS UK Business Counts, Eurostat Structural Business Statistics in the EU. Without a source you can open, there is no number.

**One contact per company**: the founder or the person who signs. The TAM is a count of companies, never a decimal number of people.

## When it fails

- `npx` cannot find or install `rivolt-tam` (no Node, `E404`, a locked-down registry): call the counter directly, same count, same wait:
  `curl -s -m 200 -X POST https://lnfulavicosvzidbnevt.supabase.co/functions/v1/tam-live -H 'content-type: application/json' -d '{"domain":"acme.com","lang":"en"}'`.
  The raw answer keeps French field names: `tam`, `entreprises` (companies), `niche`, `geographie`, `clients_vus`, `methode` (one line per segment, `Label (filters) : count. note`), `laisse_dehors` (left out), `question_appel` (next question), `sources`. Present it exactly as above.
- `not a website`: pass a bare domain, `acme.com`.
- `the count did not finish`: wait a minute and run it once more. Twice in a row: count by hand above and say so.
- A segment at 0 with a note: the registry could not count it. Report it as not counted, never as zero companies.

---

Built by [Rivolt](https://rivolt.ai), a GTM partner for B2B founders. Web version: https://rivolt.ai/tam-calculator. Also runs as an MCP server: `npx -y rivolt-tam mcp`.
