# Customer acquisition cost (CAC): Formula and dbt YAML | Silicon

URL: https://meetsilicon.com/metrics/customer-acquisition-cost/

> Customer acquisition cost is the total sales and marketing spend needed to win one new customer.

## Formula
CAC = sales and marketing spend / new customers acquired
## Why it matters
CAC, compared with customer lifetime value, tells you whether growth is profitable.
## Common pitfalls
- Include salaries and tools, not just ad spend.
- Lag spend appropriately if your sales cycle is long.
## 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_acquisition_months
meta:
metrics:
cac:
type: number
sql: ${acquisition_spend} / NULLIF(${new_customers}, 0)
description: Spend per new customer
columns:
- name: sales_marketing_spend
meta:
metrics:
acquisition_spend:
type: sum
description: Sales and marketing spend
- name: new_customer_id
meta:
metrics:
new_customers:
type: count_distinct
description: New customers won
Once it's defined, anyone can ask about customer acquisition cost in plain English and get an answer built on this definition. See the metrics reference for every option.
## Related
- Win rate ->
- 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
