GitHub Actions Costs: How to Check If a Runner Change Will Save You
- Monthly savings
- USD
- Result
- Current monthly spend
- 100 USD
- You entered
- Current monthly minutes
- 5000 min
- You entered
This article explains how to determine whether switching GitHub Actions runners—such as moving from larger to smaller machines, or from GitHub-hosted to self-hosted—will actually reduce your CI/CD costs. You’ll learn the exact metrics to compare, where to find them in your GitHub account, and how to model the cost impact before you make a change.
Formula
The calculator above estimates your new monthly spend if you switch to a runner with a different per-minute cost. The formula is:
New Monthly Spend = (Current Monthly Spend / Current Monthly Minutes) × New Runner Cost per Minute × Current Monthly Minutes
Where:
- Current Monthly Spend (USD) – what you pay now for GitHub Actions (from your billing page)
- Current Monthly Minutes (min) – total minutes your workflows used in the last month
- New Runner Cost per Minute (USD/min) – the per-minute rate of the runner you’re considering (e.g., GitHub-hosted Linux at $0.008/min, Windows at $0.016/min, or self-hosted at $0 if you ignore infrastructure)
The formula simplifies to: New Monthly Spend = Current Spend × (New Rate / Current Rate), but the calculator shows the full breakdown so you can see the effect of changing minutes too.
Worked Example
Using the defaults: you currently spend $100 per month on 5,000 minutes. Your current effective rate is $100 / 5,000 = $0.02 per minute. If you switch to a runner that costs $0.008 per minute (like a GitHub-hosted Linux runner), your new spend would be:
- Current rate = $100 / 5,000 min = $0.02/min
- New spend = $0.02/min × $0.008/min × 5,000 min = $0.008 × 5,000 = $40
- Monthly savings = $100 – $40 = $60
The calculator returns $40 as the new monthly spend and $60 as the savings, matching the example.
How GitHub Actions Billing Works
GitHub Actions charges based on the number of minutes your workflows run, multiplied by the per-minute rate for the runner type (Linux, Windows, macOS) and the machine size (e.g., 2-core, 4-core, 8-core). Every GitHub account gets a free monthly allowance: 2,000 minutes for private repositories on the free plan, and more for Pro and Team plans. Public repositories are free for standard runners. Once you exceed the allowance, you pay per minute. The rates are published on GitHub’s documentation and vary by operating system and CPU class. For example, a Linux 2-core runner is $0.008/min, while a Windows 2-core is $0.016/min, and macOS is significantly higher. Larger machines cost more per minute but may complete jobs faster, so the total cost depends on both the rate and the job duration.
Where to Find Your Current Usage and Costs
To check your current spend and minutes, go to your GitHub account settings: Settings → Billing and plans → Actions. There you’ll see a breakdown of minutes used per repository and the total cost. You can also use the GitHub API to fetch usage data programmatically. For a more detailed analysis, you can export your workflow run logs and calculate the duration of each job. The key metrics you need are:
- Total minutes per month (billed and free)
- Total cost per month
- Breakdown by runner type (Linux, Windows, macOS) and size
- Average job duration per runner type
If you’re using self-hosted runners, your “cost� is the infrastructure cost (e.g., EC2 instance, electricity, maintenance) divided by the number of minutes the runner is active. That’s harder to measure, but you can estimate it by tracking the runner’s uptime.
How to Estimate the Impact of a Runner Change
To evaluate a runner change, follow these steps:
- Measure your current effective rate – divide your monthly spend by total minutes. This gives you a baseline.
- Find the per-minute rate of the new runner – from GitHub’s pricing page or your own infrastructure cost.
- Adjust for job duration changes – a faster runner may reduce job time. For example, if you switch from a 2-core to a 4-core runner, the job might run 40% faster, so you’d use fewer minutes. But the per-minute rate is also higher, so you need to calculate the net effect.
- Run the numbers – use the calculator above or a spreadsheet to compare total monthly cost.
- Consider non-monetary factors – maintenance overhead, reliability, and security of self-hosted runners.
For a realistic estimate, pick a representative job (e.g., your main build) and time it on both the current and candidate runner. Multiply the new duration by the new rate to get the cost per job, then multiply by the number of jobs per month.
Common Mistakes and Misconceptions
One common mistake is ignoring the free minutes. If you’re currently under your free allowance, switching to a cheaper runner won’t save you any money because you’re already paying $0. Only after exceeding the allowance do per-minute costs matter. Another mistake is comparing only the per-minute rate without considering job duration. A more expensive runner that finishes in half the time can be cheaper overall. Also, don’t forget that GitHub-hosted runners include maintenance and updates, while self-hosted runners require you to handle those yourself, which has a hidden cost in time and effort. Finally, beware of rounding errors when estimating minutes—use exact durations from your workflow logs.
Comparing GitHub-Hosted vs. Self-Hosted Runners
GitHub-hosted runners are the simplest option: you pay per minute, and GitHub manages the infrastructure. Self-hosted runners are machines you run yourself, and you only pay for the infrastructure (or nothing if you have spare hardware). The tradeoff is that self-hosted runners require setup, patching, and scaling. For small projects, GitHub-hosted is usually more cost-effective because you don’t pay for idle time. For large, constant workloads, self-hosted can be cheaper—for example, if you have an always-on server that would be idle anyway. But you must factor in the cost of the machine, electricity, and your time to maintain it. Also, self-hosted runners have a 24-hour job timeout, while GitHub-hosted has a 6-hour limit, so longer jobs may require self-hosting.
Safety and Accuracy Considerations
When estimating costs, always use the latest official rates from GitHub’s documentation, as they can change. For self-hosted runners, include all costs: hardware depreciation, electricity, internet, and maintenance. If you’re using cloud VMs, use the actual instance cost, not the list price, because you might get discounts. Also, be aware that GitHub Actions has a 90-day limit on workflow run history—if you need to analyze older usage, export the data before it’s deleted. Finally, always test your runner change on a non-production branch first to ensure it doesn’t break your build.
Frequently Asked Questions
How do I see my current GitHub Actions spend?
Go to Settings → Billing and plans → Actions in your GitHub account. You’ll see a summary of minutes used and the associated cost for the current billing period. You can also click into each repository to see a breakdown.
What is the per-minute cost of GitHub-hosted runners?
As of the latest pricing, Linux 2-core is $0.008/min, Windows 2-core is $0.016/min, and macOS 2-core is $0.08/min. Larger machines cost proportionally more. These rates are for public repositories with standard runners; private repositories may have different rates. Check GitHub’s official documentation for the most current numbers.
Can I save money by using a smaller runner?
Sometimes, but not always. A smaller runner has a lower per-minute rate but may take longer to complete the job. If the job is I/O-bound or single-threaded, a smaller runner might finish in the same time, saving you money. If the job is CPU-heavy, a larger runner could finish faster and be cheaper overall despite the higher rate.
How do I calculate the cost of a self-hosted runner?
Estimate the total monthly cost of the machine (hardware, electricity, internet, cloud instance cost) and divide by the number of minutes the runner is actually running jobs. For example, if a VM costs $50/month and runs jobs for 1,000 minutes, the cost per minute is $0.05. That’s higher than GitHub-hosted Linux, so it only makes sense if you have a very high volume or need specific hardware.
Does GitHub Actions have a free tier?
Yes. Free accounts get 2,000 minutes per month for private repositories, and public repositories get unlimited minutes on standard runners. Pro accounts get 3,000 minutes, and Team gets 5,000. After that, you pay per minute.
What’s the best way to reduce GitHub Actions costs?
First, optimize your workflows to use fewer minutes: cache dependencies, run jobs in parallel, and use smaller runners where possible. Second, consider self-hosting for heavy, constant workloads. Third, monitor your usage monthly and set spending limits in GitHub to avoid surprises.
Related
Formula used
in t | Current monthly spend | USD | 100 | 0 in m | Current monthly minutes | min | 5000 | 0 in r | New runner cost per minute | USD/min | 0.008 | 0 out new_spend | New monthly spend | USD | t / m * r * m | 2 out savings | Monthly savings | USD | t - (t / m * r * m) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.