# Win rate: Formula and dbt YAML | Silicon

URL: https://meetsilicon.com/metrics/win-rate/

> Win rate is the percentage of closed sales opportunities that were won.

## Formula
Win rate = opportunities won / opportunities closed (won + lost)
## Why it matters
Win rate shows sales effectiveness and is a key input to pipeline coverage targets.
## Common pitfalls
- Exclude open opportunities, or the rate will look artificially low.
## Define it in dbt for Silicon
Add this to your model's YAML. Aggregate metrics sit under a column's meta.metrics; ratios are type: number metrics that reference other metrics. Rename models and columns to match your project.
schema.yml Copy
models:
- name: fct_opportunities
meta:
metrics:
win_rate:
type: number
sql: ${won_opportunities} / NULLIF(${closed_opportunities}, 0)
format: percent
description: Share of closed deals won
columns:
- name: opportunity_id
meta:
metrics:
closed_opportunities:
type: count_distinct
filters:
- is_closed: true
description: Closed opportunities
- name: won_opportunity_id
meta:
metrics:
won_opportunities:
type: count_distinct
description: Won opportunities
Once it's defined, anyone can ask about win rate in plain English and get an answer built on this definition. See the metrics reference for every option.
## Related
- Customer acquisition cost (CAC) ->
- Pipeline coverage ->
- Semantic layer ->
## Tell us where your data lives today.
Book 30 minutes with the founder. Tell us where your data is today, and see Silicon running on sample data.
Talk to Sujay
30-minute call with the founder
