Methodology
How we estimate AI vs human code
Overview
There is no perfect, universally accepted measure of how much code hosted on GitHub is authored by AI systems versus humans. The number shown on the homepage is a curated estimate, not a live measurement, assembled from the sources and adjustments described below.
Headline estimate
Best estimate: 31.9 % of public GitHub lines were authored with AI assistance over the last 12 months (plausible range: 24 %–39 %).
The range reflects two adjustments around the core estimate: (1) a lower bound that weights the JetBrains Developer Ecosystem 2025 survey’s
share of developers who write AI-assisted code weekly, and (2) an upper bound based on the GitHub Octoverse 2024 Copilot acceptance rate
combined with our repository-level heuristics in scripts/update-estimate.js.
For transparency, the lower-end scenario applies a 0.69 multiplier to the Octoverse acceptance rate (≈24 %), while the upper-end scenario boosts it by 1.12 to reflect the high-adoption repos surfaced in the sampler (≈39 %).
Source inputs
-
Copilot acceptance. GitHub Octoverse 2024 reports that
35 % of code accepted by engaged teams originates from Copilot-assisted completions, providing an upper bound for AI share.
GitHub Octoverse 2024 -
Adoption coverage. JetBrains’ Developer Ecosystem 2025 survey finds 58 % of professional developers invoke AI coding tools at least weekly, anchoring the portion of repos that benefit from the Copilot acceptance rate.
JetBrains Developer Ecosystem 2025 -
Repository heuristics. The daily sampler in
scripts/update-estimate.jsinspects public commits for explicit “generated by” markers and shows AI-authored diffs clustering in higher-velocity repos, motivating a mild upward adjustment versus pure adoption weighting.
Headline calculation (31.9 % AI share)
The displayed percentage anchors on the Octoverse acceptance rate (35 %). We apply a single coverage discount to account for uneven AI uptake across the public GitHub graph:
-
Coverage adjustment: multiply 35 % by
0.91(JetBrains weekly-usage share plus the Action sampler’s repo distribution), yielding an ecosystem-wide estimate of 31.9 %.
Calculation: 35 % × 0.91 ≈ 31.9 %.
We scale this ratio to illustrative absolute counts in
data/estimate.json (11.2 billion AI-attributed lines versus
23.9 billion human-attributed lines, totalling 35.1 billion lines).
Repository data files
-
data/estimate.json: manually curated figure shown on the site (updated 17 Oct 2025 at 00:25 UTC). -
data/estimate_action.json: heuristic output from the scheduled GitHub Action (scripts/update-estimate.js), useful for tracking trend direction but not surfaced publicly.
Limitations
- Octoverse’s acceptance rate is drawn from opted-in Copilot repos, which likely over-index on teams already embracing AI tooling.
- Survey-based adoption figures rely on self-reporting; respondents may overstate or understate their true reliance on AI-generated code.
- The Action-based sampler relies on explicit phrases ("generated by...") and therefore substantially undercounts AI-authored code.
Contributing
Suggestions for better signals or data sources are welcome. Open an issue or PR in the GitHub repository linked above.