All posts
5 min read

How Much Does GitHub Codespaces Actually Cost?

Codespaces bills by the hour for compute and by the GB-month for storage, with a free allowance on personal accounts. How the meter works, three worked examples from occasional to full-time use, and the settings that stop the bill surprising you.

cloud developmentcostcomparison

GitHub Codespaces has one of the more reasonable pricing models in cloud development — and one of the easier ones to misjudge. The per-hour rate looks tiny. Whether the monthly total is tiny depends on machine size, how many hours you actually use, how long idle codespaces sit around, and how many people are on the team.

Here's how the meter works and what realistic usage costs.

Prices below are GitHub's published rates at the time of writing (September 2026). Check GitHub's Codespaces billing documentation before budgeting.

The two meters

Codespaces charges for two things separately.

Compute: per hour, scaled by machine size

You pay for each hour a codespace is running, at a rate proportional to its core count:

Machine Price per hour
2-core $0.18
4-core $0.36
8-core $0.72
16-core $1.44
32-core $2.88

Doubling the cores doubles the hourly price. A codespace that's stopped doesn't use compute.

Storage: per GB-month

You pay $0.07 per GB-month for the disk your codespaces use — the repository, dependencies, and the container image. Storage is billed whether the codespace is running or stopped, for as long as it exists.

The free allowance

Personal accounts get a monthly allowance at no charge: on GitHub Free, 120 hours of compute and 15 GB-month of storage; on GitHub Pro, 180 hours and 20 GB-month. Because compute cost scales with cores, the allowance goes further on small machines than large ones — check GitHub's docs for exactly how usage is counted against it.

Organisation-owned codespaces are billed to the organisation, which sets spending limits and policies.

Worked examples

These assume a paid account with no free allowance, a 10 GB codespace, and ignore tax.

1. The occasional contributor

Ten hours a month on a 2-core machine, one codespace kept around.

  • Compute: 10 × $0.18 = $1.80
  • Storage: 10 GB × $0.07 = $0.70
  • Total: about $2.50/month — comfortably inside the free allowance on a personal account.

This is where Codespaces shines. Nothing else is this cheap for light use.

2. The regular developer

Four hours a day, 22 working days, on a 4-core machine.

  • Compute: 88 × $0.36 = $31.68
  • Storage: $0.70
  • Total: about $32/month.

Reasonable — roughly the price of a mid-range monthly developer tool.

3. The full-time team

Eight hours a day, 22 days, on an 8-core machine, ten developers, each with two codespaces of 15 GB.

  • Compute per person: 176 × $0.72 = $126.72
  • Storage per person: 30 GB × $0.07 = $2.10
  • Per person: about $129/month
  • Team of ten: about $1,290/month

This is the scenario where teams start looking at alternatives — not because the rate is high, but because full-time usage turns an hourly meter into a large, steady bill.

The hidden costs

Idle time

A codespace keeps billing compute until it stops. GitHub stops idle codespaces automatically after a timeout you can configure, but the default is long enough that "I left it open over lunch" is a real line item across a team. Shortening the idle timeout is the single most effective cost setting.

Forgotten codespaces

Stopped codespaces still bill storage. Ten developers each with a handful of abandoned codespaces is a slow, steady leak. Retention settings automatically delete codespaces that have been inactive for a set period — worth turning down from the default.

Bigger machines than needed

It's tempting to pick 8 cores "to be fast." If builds don't actually use them, you're paying double or quadruple for idle cores. Measure, then size.

Prebuilds

Prebuilds make codespaces start quickly by building them in advance — and they consume compute and storage themselves. Worth it for large repositories; worth checking for small ones.

Settings that keep the bill predictable

  • Spending limit set for the account or organisation.
  • Shorter idle timeout.
  • Shorter retention period for inactive codespaces.
  • Machine type policy restricting which sizes can be created.
  • Prebuilds only for repositories that need them.

What the price doesn't include

Codespaces is a development environment. The bill above gets you a place to write and run code while you're developing. It doesn't include:

  • Hosting the application for real users.
  • A managed database — you run one inside the codespace or pay for one elsewhere.
  • A domain and SSL for the app.
  • AI usage — Copilot is billed separately.

That's not a criticism; it's a different product boundary. But when comparing Codespaces with platforms that include hosting and databases, add those costs to the Codespaces side before comparing. We go through a full cost model in The Real Cost of a Cloud Development Environment.

Is it worth it?

For occasional use, almost certainly: it's cheap and excellent. For full-time use by a team, it depends on what you'd pay otherwise — and whether you also need somewhere for the app to run. The per-hour model rewards teams that manage idle time and machine sizes carefully, and quietly penalises teams that don't.


EasySpawn uses flat monthly pricing — $20, $40, or $60 a month — covering the workspace, managed Postgres, SSL, domains, and deployments, with no per-hour meter and no per-seat fees. Bring your own Claude subscription. Compare with Codespaces or see pricing.

Related: GitHub Codespaces Alternatives in 2026 · The Real Cost of a Cloud Development Environment

Keep reading