Persistent VMs are now available.Learn more

GitHub Codespaces Pricing: Rates, Free Hours and Team Costs

Engineering
Eli Mernit9 min read
GitHub Codespaces Pricing: Rates, Free Hours and Team Costs

GitHub Codespaces pricing has two meters. Compute is $0.18 an hour for a 2-core machine and doubles with each size, up to $2.88 an hour for 32 cores. Storage is $0.07 per GB-month and keeps billing while a codespace is stopped. Personal accounts get 120 core-hours and 15 GB-months free every month. Organizations get no free quota, so a team pays from the first hour.

This guide covers each charge, what one developer and a ten-person team pay in a month, how to cap the bill, and where the limits stop fitting a coding agent.

How GitHub Codespaces pricing works

GitHub bills Codespaces for the time a codespace is running and for the disk space it occupies. There is no per-seat fee for Codespaces itself. Usage totals are reported every hour and billed monthly to one account: the person who created the codespace, or the organization that owns it.

A bill can have three kinds of line:

  • Compute. Charged per hour while a codespace is active, at a rate set by the machine type.
  • Storage. Charged per GB-month for every codespace and prebuild that exists, running or stopped.
  • Prebuilds. Building a prebuild runs a GitHub Actions workflow, so the build time is billed as Actions usage and the result is billed as storage.

The price of your GitHub plan is separate. A Team or Enterprise Cloud seat doesn't include any Codespaces usage.

GitHub Codespaces cost per hour by machine type

A 2-core codespace costs $0.18 an hour, and every larger machine costs the same $0.09 per core-hour. The table shows GitHub's hourly rate for each machine type and what it adds up to over an 8-hour day and a 160-hour month, which is eight hours a day for twenty working days.

Machine typeCore-hours used per hourPrice per hour8-hour day160-hour month
2-core2$0.18$1.44$28.80
4-core4$0.36$2.88$57.60
8-core8$0.72$5.76$115.20
16-core16$1.44$11.52$230.40
32-core32$2.88$23.04$460.80

The smallest machine has 2 cores, 8 GB of RAM and 32 GB of storage. The largest has 32 cores, 128 GB of RAM and 128 GB of storage. GitHub's docs list only CPU machine types, from 2 to 32 cores.

Compute bills only while a codespace is running, and a codespace keeps running after you stop typing. The default idle timeout is 30 minutes, so each session that ends by timing out includes up to half an hour of paid idle time. Two sessions a day for twenty days is up to 20 idle hours a month: $3.60 on the 2-core machine and $7.20 on the 4-core. You can set the timeout anywhere from 5 to 240 minutes, and stopping a codespace by hand ends the charge right away.

GitHub Codespaces storage pricing

Storage costs $0.07 per GB-month. GitHub measures it hourly and charges for the space each codespace occupies, whether the codespace is running or stopped, until the codespace is deleted.

Some examples, each for a full month:

  • One codespace holding 32 GB: 32 × $0.07 = $2.24.
  • Three stopped codespaces holding 20 GB each: 60 × $0.07 = $4.20.
  • A codespace deleted halfway through the month accrues about half of its monthly figure, because usage is added hour by hour.

What counts toward the total depends on the dev container. A container built from GitHub's default image isn't counted. If you use a custom base image, the container is part of the codespace's billed storage. Prebuilds are billed for storage at the same rate.

Stopped codespaces are the usual source of a storage bill nobody expected. By default GitHub deletes a codespace after it has been stopped and inactive for 30 days. You can shorten that retention period to any value down to 0 days, which deletes a codespace as soon as it stops.

Is GitHub Codespaces free?

GitHub Codespaces is free for personal accounts up to a monthly quota, and it isn't free for organizations. The quota depends on the plan:

PlanCore-hours per monthStorage per month
GitHub Free, personal account12015 GB-months
GitHub Pro18020 GB-months
GitHub Free for organizationsNoneNone
GitHub TeamNoneNone
GitHub Enterprise CloudNoneNone

A core-hour is one core for one hour, so bigger machines use the quota up sooner. Here is how many hours of run time the quota buys on each machine type:

Machine typeGitHub Free, 120 core-hoursGitHub Pro, 180 core-hours
2-core60 hours90 hours
4-core30 hours45 hours
8-core15 hours22.5 hours
16-core7.5 hours11.25 hours
32-core3.75 hours5.6 hours

The quota resets at the start of each billing cycle and unused hours don't carry over. What happens when it runs out depends on your payment setup. Without a payment method on file, usage is blocked until the next cycle. With one, you keep working and pay the standard rates for the extra usage, up to any budget you've set.

For example, a developer on GitHub Free who uses the 2-core machine for 160 hours in a month uses 320 core-hours. The first 120 are included, and the other 200 cost 200 × $0.09 = $18.00.

How much GitHub Codespaces costs for a team

For a team, the bill is developers × hours × the machine rate, plus storage. Ten developers who each use a 4-core codespace for 120 hours a month cost $432 in compute, and about $458 once storage and prebuilds are added. The inputs are in the table so you can swap in your own.

LineInputsMonthly cost
Compute10 developers × 120 hours × $0.36 an hour on the 4-core machine$432.00
Codespace storage10 developers × 30 GB kept for the whole month × $0.07$21.00
Prebuild storage1 repository, 2 regions × 2 saved versions × 15 GB × $0.07$4.20
Prebuild builds20 runs × 10 minutes × $0.006 a minute on a Linux 2-core Actions runner$1.20
Total$458.40

The 120 hours is six hours a day for twenty days. The 30 GB per developer, the 15 GB prebuild and the 10-minute build are assumptions for a mid-sized repository, and yours will differ. That works out to $45.84 per developer. The same team on the 8-core machine pays $864 in compute, and on the 2-core machine $216.

Two things are left out. GitHub Team and Enterprise Cloud seats are billed separately from Codespaces. And the prebuild builds can cost less than the table shows. GitHub's billing docs say the runner cost of generating prebuilds can draw from the Actions compute included with your plan, which is $12 a month on GitHub Free and GitHub Free for organizations, $18 on Pro and Team, and $300 on Enterprise Cloud.

Who pays: the organization or the developer

By default a codespace is billed to the person who created it. An organization pays only when it has chosen organization ownership in its Codespaces settings, the codespace was created from one of its repositories, the user is a member or collaborator who has been given access, and the organization's Codespaces budget isn't set to zero.

An organization on the GitHub Free plan can't pay for Codespaces at all, so there the developer always pays. When the organization pays, it owns the codespace: an owner can delete it, policies apply to it, and it is deleted automatically if the user is removed from the organization.

What prebuilds add to the bill

A prebuild is a ready-made copy of the environment, so a new codespace opens without the setup wait. It costs money twice. Each build is an Actions workflow run, billed at Actions rates. Each saved prebuild is storage at $0.07 per GB-month.

The storage multiplies in a way that is easy to miss. GitHub creates prebuilds in every available region by default and keeps 2 versions, and each copy is billed. GitHub's own example is 4 regions and 2 versions, which is storage for up to 8 prebuilds. Limiting a prebuild configuration to the regions your team works in is the simplest saving.

How to control GitHub Codespaces costs

An organization controls its Codespaces bill with a budget and four policies. A budget stops usage only if you tell it to: without the option to stop usage when the limit is reached, GitHub emails you when you go over and keeps billing.

  • Set a budget that stops usage. Once it is reached, nobody can create or resume a codespace billed to that account. People can still export unsaved work to a branch.
  • Restrict machine types. A policy can limit an organization's codespaces to, say, 2-core and 4-core machines, which caps the hourly rate at $0.36.
  • Shorten the idle timeout. A policy can set a maximum well under the 30-minute default, which trims the paid idle time at the end of every session.
  • Shorten the retention period. Fewer days before stopped codespaces are deleted means less storage.
  • Trim prebuilds. Fewer regions and fewer saved versions.
  • Turn on usage alerts. Personal accounts can get an email at 90% and 100% of the included quota.

Policies apply only to codespaces the organization pays for. If developers own their codespaces, the organization has no say over the machine type or the timeout.

GitHub Codespaces pricing for coding agents and long-running jobs

Codespaces is priced and limited for a person in an editing session. A codespace stops after its idle timeout, which is 240 minutes at most, and it has a maximum lifetime of 12 hours whatever the timeout says. Stopping it ends every running process, so a coding agent that should work through the night needs a machine without those limits. A Beam VM is a persistent Linux machine that runs until you stop it and bills per second while it runs. For the 2-core, 8 GB shape over 160 hours, Codespaces compute is $28.80. A Beam VM on the Shared tier is $10.56 (2 × $0.011 + 8 × $0.0055 = $0.066 an hour). On the Spot tier it is $3.74 (2 × $0.0063 + 8 × $0.00135 = $0.0234 an hour), and Spot VMs are preemptible, so you restart an interrupted one by hand. A Beam VM has no browser editor, dev container support, prebuilds or pull request integration, and it is CPU-only. The monthly cost table in our GitHub Codespaces alternatives guide prices the same shape on Daytona and Google Cloud Workstations and gives the commands to create the VM.

FAQ

Is GitHub Codespaces free?

It is free for personal accounts up to a monthly quota: 120 core-hours and 15 GB-months of storage on GitHub Free, and 180 core-hours and 20 GB-months on GitHub Pro. That is 60 or 90 hours on the 2-core machine. Organization plans include no free Codespaces usage.

How much does GitHub Codespaces cost per hour?

Compute costs $0.18 an hour on the 2-core machine, $0.36 on 4 cores, $0.72 on 8 cores, $1.44 on 16 cores and $2.88 on 32 cores. Storage is billed separately at $0.07 per GB-month.

How much does GitHub Codespaces cost for a team?

Multiply developers by hours by the machine rate, then add storage. Ten developers on the 4-core machine for 120 hours each cost $432 a month in compute, and roughly $458 with 30 GB of storage each and one prebuilt repository. Organizations get no free quota.

Does GitHub Codespaces charge when a codespace is stopped?

A stopped codespace has no compute charge, and it keeps accruing storage at $0.07 per GB-month until it is deleted. GitHub deletes codespaces that have been stopped and inactive for 30 days unless you change the retention period.

What happens when the free Codespaces hours run out?

If the account has no payment method, you can't use Codespaces again until the quota resets at the start of the next billing cycle. If it has one, usage continues at the standard rates up to the budget you've set.

Does GitHub Pro include more Codespaces usage?

Yes. GitHub Pro includes 180 core-hours and 20 GB-months a month, against 120 core-hours and 15 GB-months on GitHub Free. On the 2-core machine that is 90 hours instead of 60.

How do I reduce my GitHub Codespaces bill?

Use the smallest machine that does the job, shorten the idle timeout from its 30-minute default, and delete codespaces you've finished with so they stop accruing storage. Organizations can enforce all three with policies and add a budget that stops usage at a set amount.

Run coding agents on a machine that bills per second

A Beam VM keeps an agent's disk, processes and memory between sessions, pauses when nobody is connected and bills per second while it runs. Create a Beam account to try a dev box next to your codespace. The coding agents page shows the full setup, and current rates are on the Beam pricing page.

Eli MernitPublished November 26, 2026

Pay as you go
billed by the second

Give your agents their own machines

Sign up, install the CLI, and launch a sandbox, VM, or GPU from your terminal or your coding agent.