LTV

Calculates customer lifetime value and unit economics ratios using gross margin, retention, and CAC metrics.

Purpose

Provide a unit-economics view, combining revenue quality, customer lifetime, and go-to-market efficiency into a single, decision-ready table.

This model is designed as the top-layer KPI model, enabling:

  • LTV and LTV/CAC benchmarking
  • Payback period analysis
  • Validation of GTM scalability and business sustainability

It consolidates previously derived metrics into one coherent economic picture.

Business Logic

  • Start from PnL Metrics
  • Isolate gross margin gl_id = 3000
  • Join with Customer Count View to derive ARPU
  • Join with GTM Efficiency for CAC and Retention for churn and lifetime
  • Compute:
    • ARPU = Gross Margin / Active Customers
    • ARPU / CAC ratio
    • Payback period = 1 / (ARPU / CAC)
    • Customer lifetime = 1 / churn rate
    • LTV = ARPU × Customer lifetime
    • LTV / CAC ratio
  • Default undefined divisions to 0
  • Produce one row per date and value type

Output Contract

Definitions

ColumnDescription
dateDate of the snapshot (YYYY-MM-DD)
value_typeIndicator such as actual, budget
arpuAverage gross margin per customer
arpu_cac_ratioRatio of ARPU to blended CAC
paybackCAC payback period (in periods)
customer_lifetimeExpected customer lifetime (in periods)
ltvEstimated customer lifetime value
ltv_to_cac_ratioRatio of LTV to CAC

Sample & Implementation

Customer lifetime value, payback, and LTV/CAC efficiency metrics.
datevalue_typearpuarpu_cac_ratiopaybackcustomer_lifetimeltvltv_to_cac_ratio
2025-01-01budget4800.15331.36090.7348120.0576018.4163.3114
2025-02-01budget4806.16141.36260.7339233.46151122053.8462318.1221
2025-03-01budget4812.07721.36430.733237.07691140832.4615323.4462
2025-04-01budget4817.90441.3660.7321240.69231159632.5385328.7763
2025-05-01budget4823.64551.36760.7312244.30771178453.6923334.1125
2025-06-01budget4829.30251.36920.7304247.92311197295.5385339.4545
2025-07-01budget4834.87861.37080.7295233.57141129289.5320.1736
2025-08-01budget4840.3771.37230.7287236.85711146477.8571325.0468
2025-09-01budget4845.80041.37390.7279240.14291163684.3571329.9251
2025-10-01budget4851.15081.37540.7271243.42861180908.7143334.8085
{{config(materialized='view')}}


with pnl_metrics as (
    select * from {{ ref('pnl_metrics') }}
),

customer_count_view as (
    select * from {{ref('customer_count_view')}}
),

gtm_efficiency as (
    select * from {{ref('gtm_efficiency')}}
),

retention as (
    select * from {{ref('retention')}}
),

gross_margin as (
    select
        date,
        gl_id,
        gl_account,
        value_type,
        amount
    from pnl_metrics
    where gl_id = 3000
),

arpu as (
    select
        gm.date,
        gm.value_type,
        gm.amount / ccv.current_base as arpu
    from gross_margin gm
    left join customer_count_view ccv on gm.date = ccv.date and gm.value_type = ccv.value_type
),

arpu_cac as (
    select
        arpu.date,
        arpu.value_type,
        COALESCE(arpu.arpu / gtm.sales_mkt_cac,0) as arpu_cac_ratio
    from arpu
    left join gtm_efficiency gtm on arpu.date = gtm.date and arpu.value_type = gtm.value_type
),

payback as (
    select
        apc.date,
        apc.value_type,
        COALESCE(1 / apc.arpu_cac_ratio,0) as payback
    from arpu_cac apc
),

customer_lifetime as (
    select
        r.date,
        r.value_type,
        COALESCE (1 / r.churn_qty) as customer_lifetime
    from retention r
),

ltv as (
   select
        arpu.date,
        arpu.value_type,
        arpu.arpu * clt.customer_lifetime as ltv
    from arpu
    left join customer_lifetime clt on arpu.date = clt.date and arpu.value_type = clt.value_type
)

select
    arpu.date,
    arpu.value_type,
    arpu.arpu,
    apc.arpu_cac_ratio,
    pb.payback,
    clt.customer_lifetime,
    ltv.ltv,
    COALESCE( ltv.ltv / gtm.sales_mkt_cac, 0) as ltv_to_cac_ratio
from arpu
left join arpu_cac apc on arpu.date = apc.date and arpu.value_type = apc.value_type
left join gtm_efficiency gtm on arpu.date = gtm.date and arpu.value_type = gtm.value_type
left join payback pb on arpu.date = pb.date and arpu.value_type = pb.value_type
left join customer_lifetime clt on arpu.date = clt.date and arpu.value_type = clt.value_type
left join ltv on arpu.date = ltv.date and arpu.value_type = ltv.value_type

Dependencies

On this page

Star us on GitHub

If you enjoy this content and find it useful, give us a star on GitHub to show your support and stay updated with our latest improvements.