Practical Finance for Software Engineering | Part 1: Understanding Variable Costs and Fixed Costs

Introduction

  • SaaS companies, but generally applicable to any tech company
  • companies that are pre-IPO or just after IPO
  • We spend $100K a month on storage. Is that expensive?
  • How do I explain cloud costs to executives on a different side of the business?
  • How do I work with Finance? They always want a forecast.
  • How can I provide predictability? I don’t have the answers!
  • My team wants to add a cache that will cost $XXm/year. Is that worth it?
  • Our company is about to IPO before we are profitable. Should I be concerned?
  • When can we turn a profit?

Part 1: Understanding Variable Costs and Fixed Costs

We don’t make any profits, so we make up for it in volume.

  • Variable costs increase proportionately to the number of product units you sell. The more units you produce, the more you have to spend on parts, compute, and customer support. If you are using Autoscaling Groups on AWS, the costs of running those ECS tasks or EC2 instances are variable costs.
  • Fixed costs stay constant no matter how many product units you sell. Examples include the cost of designing the product, the desk you use at work, and the lease on office space for engineering.
  • n be the number of product units sold,
  • p be the unit price,
  • revenue be defined as r(n)=n×p,
  • variable costs that went into producing those n units be denoted by v(n), and
  • fixed costs be denoted by f.
Fig. 1: f, v(n), and r(n).
Fig. 2: Same as above, but with somewhat naïve economies of scale taken into account. In some cases, The Law of Diminishing Marginal Returns can become relevant e.g. when you hit infrastructural bottlenecks and need to start investing in something like multi-region sharding.
  • r(n) is also known as Revenue
  • v(n) is also known as Cost of Goods Sold, or COGS
  • r(n)−v(n) is also known as Gross Profit. Correspondingly, [r(n)−v(n)]/r(n) is your Gross Margin; higher is better, and 75% is the benchmark for a good SaaS company.
  • r(n)−v(n)−f is also known as Operating Profit. Correspondingly, [r(n)−v(n)−f]/r(n) is your Operating Margin; higher is better. More on this later.

Bonus: Thinking on the Margins

  • Marginal Revenue (MR): additional revenue from each additional unit sold. Normally, this would be p, but since p is not always fixed (e.g. bundled deals, volume discounts), marginal revenue is more precise.
  • Marginal Cost (MC): additional cost of producing that additional unit sold. This is a more precise way of talking about v(n), and takes into consideration both economies of scale and diminishing returns.
Fig. 3: Marginal Cost, Marginal Revenue, and Price.

--

--

--

Engineering@Modern Treasury (ex-Affirm, ex-Samsara) - jimjh.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Early impression of Go from Node programmer

Having some fun with HDP

The Unspoken Etiquette of Queue-Life.

Automation: How did we automate AWS resources and reduced our AWS bill by 50%?

Traced | Stream Overlay Package

Analyzing the evolution of the Linux kernel using code authorship measures

Client Auto-Config for self-hosted Mail

What’s The Difference Between Sod & Plugs & Seeding?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
James Lim

James Lim

Engineering@Modern Treasury (ex-Affirm, ex-Samsara) - jimjh.com

More from Medium

Technical debt: what, why, and how

How Mature Architecture Happens

Lessons learned: Migrating Monolith to Microservice

SRE Journey — How to measure the Progress