Average Deal Size
Average Deal Size: The average total value of deals won in the period (total contract value, not annualized).
Formula
Average Deal Size = Total contract value of closed deals / Number of deals Computable definition
The canonical formula in the GASP formula grammar. The MCP server compiles it to SQL over the datasets listed below.
sum(field.opportunity_amount where field.opportunity_stage = 'closed_won' and in_period(field.close_date)) / count(field.opportunity_id where field.opportunity_stage = 'closed_won' and in_period(field.close_date)) Unit: currency
Notes: Uses total contract value, not annualised.
Data requirements
Grain: Per event, aggregate monthly · Frequency: Daily sync · Aggregation: aggregate (month) · Staged: no · Main source: CRM.
| Field | Dataset | Type |
|---|---|---|
close_date | opportunity | date |
opportunity_amount | opportunity | decimal |
opportunity_id | opportunity | string |
opportunity_stage | opportunity | string |
snapshot_date | opportunity | date |
Example SQL (Postgres)
SELECT (CAST((SELECT COALESCE(SUM(opportunity_amount), 0) FROM opportunity WHERE snapshot_date = :period_end AND (opportunity_stage = 'closed_won' AND (close_date >= :period_start AND close_date <= :period_end))) AS DOUBLE PRECISION) / NULLIF((SELECT COUNT(opportunity_id) FROM opportunity WHERE snapshot_date = :period_end AND (opportunity_stage = 'closed_won' AND (close_date >= :period_start AND close_date <= :period_end))), 0)) AS average_deal_size From an agent: with the GASP MCP server, call
lookup_metric({ "name": "Average Deal Size" }) or generate_query({ "metric": "Average Deal Size", "adapter": "<your adapter JSON>" }).
What It Tells You
Raw deal size. Useful when contract lengths vary significantly.