GitHub Actions Matrix & Runner Budget Calculator
Generate deterministic job combinations, apply GitHub exclude/include rules, and estimate runner minutes locally.
Examples
Exclude before partial-match include
calculateMatrix({ variables: { os: ["ubuntu", "windows"], node: [18, 20] }, exclude: [{ os: "windows", node: 18 }], include: [{ os: "macos", node: 22 }] })3 base rows minus 1 excluded, plus 1 appended macos row; excludedCount: 1The windows/node-18 row is pruned first; the macos addition conflicts with every surviving row so it appends instead of merging.
macOS cost weighting
calculateMatrix({ variables: { os: ["ubuntu", "windows", "macos"] }, minutesPerJob: 5 })billedMinutes: 15, weightedMinutes: 65 (5 + 10 + 50)Each 5-minute job bills 5 minutes but weights to 1x, 2x, and 10x by runner OS.
About this tool
GitHub Actions Matrix Calculator expands variables with calculateMatrix(input): every key's value list crosses into the full cartesian product (empty value lists are dropped), totalBeforeRules records the pre-rule count, then exclude rules apply first via partial matching — a rule like { os: "windows", node: 18 } removes every combination containing at least those keys — and excludedCount reports how many rows disappeared.
Include rules apply second with GitHub's partial-match semantics: an addition merges (canMerge) into every existing row it does not conflict with, gaining its extra keys, and only appends as a brand-new row when it matches nothing (e.g. { os: "macos", node: 22 } beside ubuntu/windows rows). The result also carries waves (ceil(combos / concurrency), 0 when empty), billedMinutes (rows × minutesPerJob), and overLimit (true above 256 combinations).
Cost weighting follows the runner in each row (os, runner, or runs-on, defaulting to linux): linux/ubuntu count 1x, windows 2x, macos/mac 10x, anything else 1x, summed into weightedMinutes. Concurrency floors to at least 1 and minutesPerJob to at least 0, and formatCombination(combination, keys?) renders a row as key=value pairs joined with ·.
How to use this tool
Define the axes
Pass variables such as { os: ["ubuntu", "windows"], node: [18, 20] } — the tool builds all 4 combinations before rules run.
Exclude first, then include
List exclude rules to prune rows by partial match, then include rules to enrich matching rows with extra keys or append entirely new rows.
Size the run
Set concurrency and minutesPerJob to read waves, billedMinutes, and the macOS-weighted weightedMinutes; keep combos at or below 256 to clear overLimit.
Use cases
Previewing matrix size before pushing
Expand variables locally and confirm the combo count stays under GitHub's 256 limit instead of discovering it in CI.
Estimating runner spend
Compare weightedMinutes across linux, windows, and macos axes to decide which OS entries earn their 2x/10x multiplier.
Debugging exclude/include interplay
Verify that excludes prune by partial match and that includes merge into compatible rows rather than duplicating them.
Common mistakes
Mistake:Assuming include always adds a new job.
Fix:An include whose keys are compatible with existing rows merges into all of them (e.g. { experimental: true } enriches rather than appends) — only conflicting additions create new rows.
Mistake:Expecting exclude to require a full-row match.
Fix:Excludes are partial: { node: 18 } removes every combination with node 18 regardless of OS, which can empty the whole matrix.
Mistake:Budgeting macOS jobs at face minutes.
Fix:macos/mac runners weight 10x and windows 2x in weightedMinutes — read that field, not billedMinutes, for cost planning.
Frequently asked questions
What does this tool do?
It expands your matrix variables into every combination, applies exclude rules first (partial match) and include rules second (merge-or-append), then reports totalBeforeRules, excludedCount, waves from your concurrency, billedMinutes, OS-weighted weightedMinutes, and whether you exceed the 256-combination limit.
Why did my include add keys to existing jobs instead of creating a new one?
Includes use partial-match semantics: an addition compatible with a row merges into it (e.g. { experimental: true } enriches every matching job), and only conflicting additions — like a new macos OS value — append as fresh rows. That mirrors how GitHub Actions include blocks behave.
Is my workflow data uploaded or stored?
No. The cartesian expansion, rule matching, and cost math run entirely in your browser — nothing you enter is sent anywhere.
How should I read weightedMinutes versus billedMinutes?
billedMinutes is rows × minutesPerJob at face value; weightedMinutes multiplies each job by its runner cost (linux/ubuntu 1x, windows 2x, macos/mac 10x). A 5-minute macOS job bills 5 minutes but weights 50 — use weightedMinutes for cost planning.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML