Skip to main content

GitHub Actions Cost Calculator & Minutes Optimization

GitHub Actions is free for public repositories but can become a significant line item for active private repos — especially if macOS runners are involved. This guide breaks down the pricing model, explains the OS multipliers most teams overlook, and walks through the highest-ROI optimizations to keep your CI costs under control.

✓ Pricing by plan & OS type ✓ Cost multipliers explained ✓ Cost estimation formulas ✓ Concurrency groups & job conditions ✓ Self-hosted runner decision guide
Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →

Pricing by Plan & OS Multipliers

Each GitHub plan includes a monthly free minutes allowance. Usage beyond the allowance is billed at per-minute rates that vary by runner OS. macOS runners are 10x the Linux price — the single most common source of surprise costs.

Plan Free minutes/mo Linux $/min Windows $/min macOS $/min
Free 2,000 $0.008 $0.016 $0.080
Pro 3,000 $0.008 $0.016 $0.080
Team 3,000 $0.008 $0.016 $0.080
Enterprise 50,000 $0.008 $0.016 $0.080

OS multipliers applied to free minutes: Linux 1x, Windows 2x, macOS 10x. A 10-minute macOS job consumes 100 minutes from your free allowance.

Concurrency Groups — Cancel Superseded Runs

Add a concurrency group to your workflows to automatically cancel in-progress runs when a new commit is pushed to the same branch. This alone can cut wasted minutes by 40–60% on active feature branches.

name: CI

# Cancel previous runs on the same branch when new commit is pushed
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches: ['**']
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test

Job Conditions — Skip Expensive Jobs Smartly

Use path filters and branch conditions to skip expensive jobs when they are not needed. An E2E test suite that only runs on main saves hundreds of minutes per month on teams with active PR pipelines.

jobs:
  # Cheap: runs on every push
  unit-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm test:unit

  # Expensive: only runs on main branch or manual trigger
  e2e-test:
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
    steps:
      - uses: actions/checkout@v4
      - run: npm run test:e2e

  # Skip if only docs changed (use dorny/paths-filter)
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: dorny/paths-filter@v3
        id: filter
        with:
          filters: |
            src:
              - 'src/**'
              - 'package.json'
      - if: steps.filter.outputs.src == 'true'
        run: npm run build

Cost Estimation Formula

Use this formula to estimate your monthly GitHub Actions spend before you get a surprise invoice.

# Monthly cost estimation formula
#
# total_raw_minutes = sum of (actual_job_duration * os_multiplier)
#   Linux multiplier   = 1x
#   Windows multiplier = 2x
#   macOS multiplier   = 10x
#
# billable_minutes = max(0, total_raw_minutes - plan_included_minutes)
# monthly_cost     = billable_minutes * $0.008

# Example: Team with 5 devs, 80 PRs/month
# Pipeline per PR: 8min Linux CI + 5min macOS build
#
# Linux:  80 * 8  * 1  =   640 raw minutes
# macOS:  80 * 5  * 10 = 4,000 raw minutes
# Total raw: 4,640 minutes
# Plan allowance (Team): 3,000 minutes
# Billable: 4,640 - 3,000 = 1,640 minutes
# Cost: 1,640 * $0.008 = $13.12/month
#
# FIX: Move macOS build to only run on main (8 merges/month):
# macOS: 8 * 5 * 10 = 400 raw minutes
# Total: 640 + 400 = 1,040 minutes → within free allowance → $0/month

Frequently Asked Questions

How does GitHub Actions billing work for private repositories?▼

GitHub Actions usage on private repos is billed by minutes per month. Each GitHub plan includes a free minute allowance: Free (2,000 min), Pro (3,000 min), Team (3,000 min), Enterprise (50,000 min). Once you exceed the included minutes, you are billed per-minute: Linux $0.008/min, Windows $0.016/min, macOS $0.08/min. Public repositories get unlimited free minutes on all plans. Minutes are tracked per billing cycle and reset monthly.

Why do Windows and macOS runners cost more?▼

GitHub applies cost multipliers based on operating system. Linux runners (ubuntu-latest) count at 1x. Windows runners count at 2x — a 10-minute Windows job consumes 20 minutes from your allowance. macOS runners count at 10x — a 10-minute macOS job consumes 100 minutes. This reflects the actual infrastructure cost differences. If you are running macOS jobs for tasks that do not require macOS (like unit tests), switching to ubuntu-latest can cut those minutes by 90%.

What are concurrency groups and how do they save money?▼

Concurrency groups cancel in-progress or queued runs when a new run for the same group is triggered. Set concurrency: { group: '${{ github.workflow }}-${{ github.ref }}', cancel-in-progress: true } on your workflow. This prevents wasted minutes on commits that are immediately superseded — if you push 5 commits in quick succession, only the latest run executes. For feature branches this is almost always the right behavior. Avoid it on the main branch where you want all runs to complete.

Are self-hosted runners free?▼

Yes — actions minutes are not charged for jobs running on self-hosted runners. You only pay for the underlying infrastructure (EC2, GCE, Azure VM, etc.). Self-hosted runners are cost-effective when you have predictable, high-volume workloads, need specialized hardware (GPU, ARM, high memory), or require access to private networks. The tradeoff is operational overhead: you manage scaling, security patching, and availability. GitHub's larger hosted runners (8-core, 16-core) are a middle ground — faster than standard runners, no maintenance.

How do I estimate my monthly GitHub Actions cost?▼

Formula: monthly_cost = max(0, total_minutes - included_minutes) * per_minute_rate. Where total_minutes = sum of (job_duration_minutes * os_multiplier) across all workflow runs. Track your current usage at Settings → Billing → GitHub Actions. For a team running 100 PRs/month with a 10-minute Linux pipeline each: 100 * 10 * 1 = 1,000 minutes. On Team plan (3,000 free minutes), this is within the free tier. Add a 15-minute macOS build: 100 * 15 * 10 = 15,000 additional minutes = $96/month extra.

What is the most effective way to reduce GitHub Actions costs?▼

In order of impact: (1) Use Linux runners for any job that doesn't require Windows/macOS — biggest win if you have accidental macOS jobs. (2) Add concurrency groups to cancel superseded runs on feature branches. (3) Add job conditions (if: github.ref == 'refs/heads/main') to skip expensive jobs on draft PRs or docs-only changes. (4) Cache dependencies to reduce job duration. (5) Split workflows — run expensive jobs (full E2E, security scan) only on main merge, not every PR push.