Unit Economics Calculator Formula

Understand the math behind the unit economics calculator. Each variable explained with a worked example.

Formulas Used

Gross Profit Per Unit

gross_profit_per_unit = selling_price - cogs_per_unit

Contribution Per Unit

contribution_per_unit = selling_price - cogs_per_unit - operating_cost_per_unit - cac_per_unit

Unit Margin

unit_margin = selling_price > 0 ? ((selling_price - cogs_per_unit - operating_cost_per_unit - cac_per_unit) / selling_price) * 100 : 0

Variables

VariableDescriptionDefault
selling_priceSelling Price Per Unit(USD)120
cogs_per_unitCost of Goods Per Unit(USD)40
operating_cost_per_unitOperating Cost Per Unit (allocated)(USD)30
cac_per_unitAcquisition Cost Allocated Per Unit(USD)15

How It Works

How to Calculate Unit Economics

Formula

Contribution Per Unit = Selling Price - COGS - Operating Cost - Acquisition Cost Unit Margin = Contribution / Selling Price x 100

Unit economics answers the fundamental business question: do you make money on each sale? Positive unit economics means you earn profit on every transaction and can scale profitably. Negative unit economics means scaling only accelerates losses. Startups sometimes operate with negative unit economics temporarily to capture market share, but eventually every unit sold must contribute positive margin.

Worked Example

A product sells for $120. COGS is $40, allocated operating cost is $30, and acquisition cost is $15 per unit.

selling_price = 120cogs_per_unit = 40operating_cost_per_unit = 30cac_per_unit = 15
  1. 01Gross Profit = $120 - $40 = $80
  2. 02Contribution = $120 - $40 - $30 - $15 = $35
  3. 03Unit Margin = ($35 / $120) x 100 = 29.2%

Ready to run the numbers?

Open Unit Economics Calculator