GitHub Codespaces looks free until the moment it isn't, and the exact point where that happens depends on machine size and how many browser tabs of "just one more Codespace" a team leaves running overnight. The pricing model is usage-based rather than flat per-seat, which makes it cheap for light use and genuinely expensive for anyone who forgets to stop an instance.
The free tier that most people actually stay inside
Every GitHub account, personal or organizational, gets 120 core-hours of compute and 15 GB-months of storage free every month, no credit card required to start. That free allotment translates differently depending on the machine size chosen: a 2-core Codespace burns through it in 60 hours, a 4-core machine in 30 hours, and an 8-core machine in just 15 hours. For a solo developer doing occasional cloud-based coding sessions on the default 2-core machine, 60 hours a month is genuinely enough to never see a bill.
The free tier resets monthly and doesn't roll over, so unused hours in a light month don't carry forward to cover a heavier one. That's the first thing that catches teams by surprise: a quiet March followed by a code-heavy April doesn't average out, each month starts back at zero.
What compute actually costs beyond the free tier
Once the free hours run out, GitHub bills by core-hour at a flat rate regardless of what's actually running inside the container. The published rates: $0.18/hour for a 2-core machine, $0.36/hour for 4-core, $0.72/hour for 8-core, $1.44/hour for 16-core, and $2.88/hour for the largest 32-core option. These rates apply uniformly whether the account is a Free, Team, or Enterprise GitHub plan, Codespaces billing sits entirely outside the regular per-seat subscription tiers.
The core-hour math adds up fast for anyone running a beefier machine for real work. A developer using an 8-core Codespace for a full 8-hour workday, 20 workdays a month, burns 160 hours, well past the 15-hour free allowance on that machine size, leaving 145 billable hours at $0.72/hour, or roughly $104/month for one person's daytime coding environment alone.
Storage costs that add up quietly
Storage bills separately at $0.07 per GB-month for anything beyond the 15 GB-month free allowance, and this is the cost category that tends to surprise teams the most. Every Codespace that gets created and left idle, rather than deleted, keeps consuming storage even while stopped, since the underlying disk image and any uncommitted work still lives on GitHub's infrastructure. A team with a habit of spinning up a fresh Codespace per feature branch and never cleaning up old ones can accumulate dozens of idle environments, each quietly billing storage month after month for work that was already merged and forgotten.
The fix is simple in principle, delete Codespaces once a branch merges, but requires actual discipline or automation, since nothing in the default workflow forces cleanup. GitHub does auto-delete Codespaces that go untouched for 30 days by default, which caps the damage but still means a month of unnecessary storage charges before the automatic cleanup kicks in.
Prebuilds: faster environments, an extra recurring cost
Prebuilds let a team configure a Codespace to boot in seconds instead of minutes by having GitHub build and cache the dev container image ahead of time, refreshed automatically on a schedule or on every push to a given branch. That convenience isn't free: prebuilds consume both compute (to run the build) and storage (to cache the resulting image), and a prebuild configured to refresh on every commit to a busy repository can rack up compute charges that dwarf what the actual developer sessions cost.
The realistic advice for teams considering prebuilds: scope them to a small number of frequently-used branches, main and maybe one or two active release branches, rather than every branch in the repository, and set the refresh trigger to a schedule (nightly, for instance) rather than every push unless the repo genuinely needs that freshness.
Real cost at different team sizes
A solo developer using Codespaces occasionally for quick fixes or reviewing PRs from a tablet: almost certainly stays inside the 60 free hours on a 2-core machine, $0/month is the realistic outcome.
A 5-person startup team where each developer runs an 8-core Codespace for roughly half their workday (4 hours, 20 days/month = 80 hours each): each developer uses 65 billable hours past their individual 15-hour free allowance, at $0.72/hour that's about $47/month per developer, or $235/month for the team, before storage and any prebuild costs.
A 20-person engineering org running Codespaces as the default dev environment with 8-core machines full-time (160 hours/month each): 145 billable hours per developer at $0.72/hour is roughly $104/month per person, or $2,080/month for the org just in compute, storage and prebuilds pushing that meaningfully higher in practice.
Where this actually makes sense versus a local dev setup
Codespaces earns its cost for teams with inconsistent or resource-heavy local development requirements, onboarding a new hire with a working environment in under a minute instead of a half-day laptop setup, or supporting contributors on underpowered personal machines who couldn't otherwise run the full stack locally. It also removes the "works on my machine" class of bugs entirely, since every Codespace boots from the same container definition.
It makes less sense for teams already happy with local development who would just be paying compute costs for infrastructure their laptops already provide for free. The break-even point depends heavily on machine size and actual usage hours, teams should track their first month or two of usage closely before assuming Codespaces is either cheap or expensive for their specific workload.
How this compares to just running Actions minutes instead
Teams already paying for GitHub Team ($4/user/month) or Enterprise ($21/user/month) sometimes assume Codespaces usage rolls into that subscription the same way Actions minutes do. It doesn't. GitHub Actions minutes (3,000/month on Team, 50,000 on Enterprise) and Codespaces core-hours are billed on entirely separate meters, and a team can be well within its Actions budget while quietly racking up a large Codespaces bill on the side, since nothing in the standard usage dashboard makes the two costs obviously connected at a glance. Anyone tracking GitHub spend closely should check the Codespaces usage page specifically, not just the overall Actions minutes summary, to catch this before the monthly invoice arrives.
Controls that actually cap the damage
Organizations on GitHub Team or Enterprise plans can set spending limits on Codespaces usage at the org level, capping total monthly spend so a runaway prebuild schedule or a forgotten idle Codespace can't silently balloon into an unexpected bill. Admins can also restrict which machine sizes are available to developers, which is the single most effective lever for controlling cost: limiting a team to 2-core or 4-core machines by policy prevents the expensive 8-core-plus scenarios entirely unless there's a genuine workload reason to allow them. Setting an org-wide idle timeout shorter than the default (Codespaces auto-suspend after 30 minutes of inactivity by default, and this is configurable down to as little as 5 minutes) also meaningfully cuts wasted compute from developers who step away without stopping their session manually.
The honest bottom line
GitHub Codespaces is inexpensive for light or occasional use and can get genuinely costly for teams running full-time on larger machines without any usage discipline. The free tier is generous enough that most individual developers never pay a cent, but a team migrating wholesale to Codespaces as the default dev environment should budget real money, not treat the free allowance as a rough approximation of the eventual bill. Setting up basic hygiene, smaller default machine sizes, aggressive Codespace cleanup, and scoped prebuilds, is the difference between a genuinely cheap developer experience upgrade and a surprising line item on next month's GitHub invoice.