Free — no signup required

Calculating the Unit Cost in Practice

2 min read

Unit economics sounds simple in theory — divide cost by units. In practice, two significant challenges make this harder than it appears.

Challenge 1: Getting the Numerator Right (Cost Allocation)

You need to know exactly how much cloud cost is attributable to the specific business activity you are measuring.

Consider a shared PostgreSQL database that serves both the "Checkout" service and the "User Profile" service. If you want to calculate "Cost per Transaction," how much of that database's monthly bill belongs to checkout activity versus profile lookups?

This requires mature cost allocation practices:
- Resource tagging: Every cloud resource tagged with the service and team that owns it.
- Shared cost allocation rules: A defined policy for splitting shared infrastructure costs (e.g., proportional to request volume, or equally split).
- Chargeback/showback models: Internal accounting that assigns costs to the business unit that consumed them.

Without this foundation, your unit cost numerator is an estimate at best and meaningless at worst.

Challenge 2: Getting the Denominator Right (Business Data)

Cloud bills do not know how many users you have, how many orders were placed, or how many rides were completed. This data lives in completely separate systems — your production database, your analytics platform (Mixpanel, Amplitude, Google Analytics), or your data warehouse (Snowflake, BigQuery).

Calculating unit economics requires joining two data sources that were never designed to talk to each other:

Unit Cost = (Cloud Cost Data from AWS/Azure/GCP)
            ÷
            (Business Volume Data from Analytics/Database)

This join is typically built as a custom dashboard in a BI tool (Looker, Grafana, Tableau) or a scheduled query in a data warehouse. It is rarely an out-of-the-box report from any single vendor.

A Practical Data Pipeline

A common implementation pattern looks like this:

The engineering investment to build this pipeline is significant, but it pays dividends: every optimization effort can now be measured in business terms.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free