Cloud unit economics
Why unit economics matters
A monthly cloud bill answers how much was spent; it does not show what was achieved. A unit metric divides a consistently scoped cost by a meaningful output. This lesson builds on the FinOps operating model to compute cost per completed order, compare two months and identify unallocated spend. Resource efficiency metrics (cost per GB processed) help engineers; business metrics (cost per fulfilled order or active customer) help product and finance make trade-offs.
Define completed order as a distinct successfully completed order ID, excluding duplicates, test traffic and cancelled orders. Use the same time window, currency, cost basis and population for numerator and denominator. An order can consume multiple resources, so do not equate requests to orders. Decide whether this is cloud-only or fully loaded cost; here it is cloud-only and includes unallocated costs.
Work through the numbers
| Metric | Baseline month | Growth month |
|---|---|---|
| Cloud cost (USD, fictional) | 1,200 | 1,320 |
| Completed orders | 10,000 | 12,000 |
| Cost per completed order | $0.120 | $0.110 |
Cost rose by 10%, order volume by 20%, and unit cost decreased by about 8.33%. This does not establish profit: revenue, labor, refunds and other costs are outside the numerator. The lower unit cost may also hide a degraded user experience. Pair it with availability, p95 latency and order completion rate. If the denominator is zero or incomplete, mark the metric unavailable; never report zero dollars per order as a substitute.
For the baseline ledger, assigned costs are $750 + $350 = $1,100 and unknown cost is $100. Coverage is 91.67%. Cost per order is $1,200 / 10,000, not $1,100 / 10,000. Excluding unassigned cost would bias the portfolio metric. Do not assign both product teams the same entire order count unless explicitly defining their metric as cost contribution per portfolio order.
Executable offline allocation model
Run the following using Python 3 and its standard library. The synthetic rows stand in for a normalized export, not an actual AWS, Azure or Google schema. Amounts are decimal strings, so arithmetic avoids binary floating-point representation error. IDs are unique within this single snapshot; a repeated ID raises an error rather than doubling spend. The owner enum has an explicit unknown bucket. Only nonnegative costs and a single USD period/basis are accepted by design; signed adjustments, FX, taxes and final currency rounding are outside this model.
from decimal import Decimal as D
def allocate(rows, storefront_share, orders): """Allocate a positive-cost USD analytical ledger; no invoice engine.""" share = D(storefront_share) if not share.is_finite() or not 0 <= share <= 1: raise ValueError("invalid allocation share") if type(orders) is not int or orders < 0: raise ValueError("invalid order count") buckets = {k: D(0) for k in ("storefront", "fulfillment", "shared", "unknown")} seen = set() for row_id, owner, amount in rows: cost = D(amount) if row_id in seen or owner not in buckets or not cost.is_finite() or cost < 0: raise ValueError("invalid ledger row") seen.add(row_id) buckets[owner] += cost total = sum(buckets.values()) storefront = buckets["storefront"] + buckets["shared"] * share fulfillment = buckets["fulfillment"] + buckets["shared"] * (1-share) unknown = buckets["unknown"] return {"total": total, "storefront": storefront, "fulfillment": fulfillment, "unknown": unknown, "coverage": (total-unknown)/total if total else None, "cost_per_order": total/orders if orders else None}
rows = [("a", "storefront", "600"), ("b", "fulfillment", "300"), ("c", "shared", "200"), ("d", "unknown", "100")]result = allocate(rows, "0.75", 10000)print(f"Total: ${result['total']:.2f}")print(f"Storefront: ${result['storefront']:.2f}")print(f"Fulfillment: ${result['fulfillment']:.2f}")print(f"Unknown: ${result['unknown']:.2f}")print(f"Coverage: {result['coverage']:.2%}")print(f"Cost per order: ${result['cost_per_order']:.3f}")Expected output:
Total: $1200.00Storefront: $750.00Fulfillment: $350.00Unknown: $100.00Coverage: 91.67%Cost per order: $0.120The allocation multiplies the shared cost by the storefront share and assigns its complement to fulfillment, preserving the total exactly within this small decimal example. Production allocation needs a rounding/residual policy to conserve cents and a reconciliation step. A real ingestion pipeline must validate source identity, currencies, period, basis, adjustment types and export completeness before calling such a function; this function assumes these upstream checks. No cloud API calls occur.
Forecast from workload drivers
Suppose monthly fixed cloud cost is $600 and variable cost is $0.06 per order. A simple forecast at 12,000 orders is $600 + $720 = $1,320. At 8,000 orders it is $1,080; at 15,000 it is $1,500. These are scenario estimates, not provider quotes; stepwise scaling, idle capacity, minimum charges and volume discounts can invalidate a linear assumption. Forecast uncertainty is a range rather than false precision.
Against a $1,250 approved budget, the base forecast is $70 over (5.6%). A budget alert should go to a named owner. If a forecast uses 12,000 orders and actual is 10,000, separate volume effects from rate/efficiency effects. Keep versioned assumptions and evaluate errors once the accounting period closes. Compare cost changes against value and reliability, and escalate any funding change or purchase for explicit approval.
Build a reliable report
Capture original exports immutably with a timestamp and restricted access. Normalize currency and cost basis, classify charges, deduplicate using the documented source identity and handle revised rows deliberately. Map owner tags through a versioned registry. Allocate shared charges using approved measured drivers. Retain unknown items with reason codes. Check that attributed plus unknown equals scoped total; then join validated business output counts. Record estimated versus reconciled status, period and report version. A missing export is not zero cost.
A cost increase may be due to new demand, a rate change, delayed reporting, tag policy changes or an accounting adjustment. Investigate before claiming savings. Avoid comparing a partial month against a closed month; use equal elapsed windows and label the estimate. Reconcile against invoice month and applicable credits/taxes, not just usage date. Restrict access to detailed spend and customer metadata.
Try it and review
Change the shared allocation share to 0.60 and verify storefront $720, fulfillment $380, unknown $100 and total $1,200. With zero completed orders, the cost per order should be unavailable. Add a repeated row ID and expect a validation error. If a new cost of $50 is unknown, total becomes $1,250 and allocated coverage falls to 88%. Document an owner and follow-up action for the new unknown charge instead of hiding it.
A good FinOps report states what is measured, what is excluded, the evidence freshness and the decision it supports. The next chapter expands this foundation into rate and usage optimization and normalized multi-cloud billing. Reference: FinOps Foundation unit economics and forecasting capabilities, AWS Cost Explorer, Azure Cost Management and Google Cloud Billing documentation (source register).
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Cloud unit economics — knowledge check
Choose the best answer for each offline scenario.
What is the cloud cost per order for $1,200 and 10,000 completed orders?
The next month costs $1,320 for 12,000 orders. What happened?
What should a cost-per-order report show when there are no completed orders?
What is allocated coverage with $1,100 assigned of $1,200 total?
A forecast is $1,320 and the approved budget is $1,250. What is the next step?