Please help me understand my Codespaces bill for a 2‑core only workflow #195353
Replies: 6 comments
|
Hey @MatMoto-Admin — I looked into your invoice numbers. The math you did is actually correct. Here is what is happening. The invoices combine compute and storage into one line. For January, $42.52 total. Let us break it down. A 2-core machine costs $0.18 per hour. Each hour uses 2 core-hours because of the multiplier you mentioned . That part is correct. If you had 4 GB of storage for the whole month of January (31 days), that would cost roughly 4 × $0.07 = $0.28 for storage. But your total is $42.52. That means almost all of it is compute. 236 active hours in January (your math) is actually realistic. That is about 7 to 8 hours per day. If you left your codespace running overnight or over the weekend, those hours add up fast. Even if you were not actively working, the clock keeps running as long as the codespace is active . Storage does not explain the difference because it is billed per GB per month at $0.07, which is very small compared to compute . The invoice itself will not show a separate line for compute versus storage. You need to check the usage graph in your billing settings. Go to Settings → Billing and licensing → Usage → Select Codespaces from the dropdown. That view breaks down exactly how many core-hours you used and how much storage you consumed . Your math was not wrong. The invoices are just not detailed enough. The usage page will give you the answer you are looking for. |
|
Your calculation is close, but the invoice total includes both compute and storage charges, not just active machine hours. For a 2-core Codespace:
So dividing the full invoice only by $0.18/hour will make the active hours look higher than expected. The best way to see the exact breakdown is in:
There you can check:
Also, stopped CodeSpaces still use storage until they are deleted, which may explain part of the month-to-month cost difference. |
|
Your calculation is generally correct, but the invoice includes both compute and storage charges. Storage costs are usually small, so most of the total is likely compute usage — especially if Codespaces were left running for long periods. The best way to see the exact breakdown is in GitHub Billing → Usage → Codespaces, where you can check compute hours, storage usage, and usage graphs separately. |
|
Your math is actually right, but the invoice lumps compute and storage together into one total which is why it looks confusing. The thing is storage charges at $0.07/GB per month are so tiny compared to compute that they barely move the needle. So yeah most of that $42 and $53 is pretty much all compute. Those 236 and 296 active hours aren't as crazy as they sound either, if you left your Codespace running without actively using it the clock still keeps ticking. A few overnight sessions or a weekend where you forgot to stop it adds up really fast. To get the actual breakdown the invoice itself won't show you compute vs storage separately, you have to go here: Settings → Billing and licensing → Usage → Codespaces That view shows you exactly how many core-hours you used and how much storage you're being charged for, way more useful than the invoice alone. Also worth remembering, stopped Codespaces still rack up storage charges until you actually delete them, so if you have old ones sitting around that could be adding a small but consistent cost every month. |
|
You’re probably mixing up “machine size” with actual billed runtime — and GitHub’s billing UI makes this more confusing than it should be. A few things to pressure-test first: A 2-core Codespace is billed per running hour, not per “active coding” hour. Your math is technically correct if the invoice were compute-only: 42.52÷0.18≈236 hours and 53.27÷0.18≈296 hours So the real question becomes: “Could my Codespaces realistically have been running that long without me noticing?” And honestly: yes. Very easily. 236 hours over 21 days is only about: 21 ≈11.2 hours/day 296 hours over 28 days is: 28 ≈10.6 hours/day That’s not “24/7 accidentally left on” territory. That’s closer to: opening Codespaces daily, The storage side is probably not the main driver unless you stored a lot. At $0.07/GB-month: 10 GB storage ≈ $0.70/month So unless you had unusually large environments, most of your bill was almost certainly compute. The cleanest way to answer this precisely is: Go to: That usage graph is much more trustworthy than reverse-engineering totals from invoices. One more thing people often miss: A 2-core machine billing rate is not always literally “2 × 1-core runtime” in the way humans intuitively think. GitHub internally bills in core-hours, but invoices surface dollar totals, which can obscure: partial hours, If you want, you could also reply in the thread with something sharper and more technical like: “Based on the pricing math, my invoices imply ~236 and ~296 billed compute hours respectively, which seems higher than my perceived interactive usage. I suspect idle runtime or non-obvious background uptime rather than storage, since storage at $0.07/GB-month would contribute relatively little unless usage was unusually large. Has anyone found a reliable way to export or inspect per-Codespace runtime history beyond the billing usage graphs?” That version sounds more experienced and avoids the “I don’t understand billing” tone. |
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
Body
Hi everyone,
I’m trying to reconcile my GitHub Codespaces invoices, and I’d appreciate some help understanding how the charges are calculated.
I used only 2‑core machines. My two invoices show:
Period Days Invoice total
Jan 11–31, 2026 (21 days) 21 days $42.52
Feb 1–28, 2026 (28 days) 28 days $53.27
Given that I only used 2‑core machines, I understand that:
· Compute is billed at $0.18 per hour for a 2‑core machine.
· The multiplier for a 2‑core machine is 2, so 1 active hour on a 2‑core instance consumes 2 core‑hours.
· Storage is billed at $0.07 per GB per month and continues even when a Codespace is stopped.
I have two questions:
If my invoice were purely compute, a 2‑core machine at $0.18/hour would imply roughly:
· January: $42.52 ÷ $0.18 ≈ 236 active hours
· February: $53.27 ÷ $0.18 ≈ 296 active hours
These numbers seem high for daily part‑time work, so I must be missing something.
Storage costs $0.07/GB‑month. A 2‑core instance might be to blame for part of the month‑over‑month difference.
My main question:
Given that I used only 2‑core machines, is there a known way to see the exact breakdown of compute hours versus storage on the invoice? Or should I check my usage graph in the billing settings to estimate these numbers?
Thank you for any insights.
All reactions