How big are GitHub repos, and is the estimate right?
Two questions: does the lines-of-code estimate (GitHub language bytes ÷ 41) hold for repos from 2024, 2020 and 2010? And how big is a typical new GitHub repo each year from 2010 to 2026?
Key takeaways
Validation: does the estimate hold for older repos?
For 2024, 2020 and 2010, we took random repos spread evenly across six size buckets, cloned and counted them, and compared the real count with both estimators. The models are not refitted; they're used exactly as calibrated on the 2026 sample [1]:
- Language bytes: LOC = GitHub code bytes ÷ 41 [2]
- Size (for comparison): LOC = 58.1 × size_kb0.73
Size trend, 2010–2026
10,000 fully random repos per creation year (forks excluded). Lines of code are estimated with the language-bytes model. Empty repos and repos with no code are reported separately, because they dominate a random sample and would push every median to zero.
Is the 2026 jump real?
Two checks: a second, independent sample of 10,000 repos created in 2026 (none shared with the first), and the same median broken down by the month each repo was created.
What's behind the jump?
A follow-up on a random subsample of the main sample: about 500 repos per year for 2016, 2018, 2020 and 2022–2025, and 750 for 2026. For each repo we read its git history directly [7]: the default branch as it was 7, 90 and 365 days after creation, plus today. Each snapshot's code is counted from file sizes by extension, with dependencies and minified files left out. At today's state this matches GitHub's language bytes (median ratio 1.00), so the numbers are comparable with the rest of the report. Three questions: is 2026 only bigger because its repos are younger, do AI coding agents leave traces, and are READMEs growing too?
Size buckets by year
Language mix
Share of each year's sample by GitHub's primary language (top 6). Repos with no detected language are counted in the denominator but not listed.
Top 50 languages, 2010–2026
The 50 languages found in the most sampled repos (any amount of code, all years combined), as GitHub's Linguist detects them [5]. Pick up to 8 at once to compare; the list is ranked by how many sampled repos use each language.
Method
- Random sampling. GitHub search can't return random results, so for each year we pick random time windows and take repos created inside each window, using the
created:qualifier with second-level timestamps [3]. Each year uses one fixed window length, sized from the year's total so a window holds about 10 repos, and every repo in a window is taken (paging through busy windows). Every repo created that year therefore has the same chance of being picked, including ones from bursts of activity. Confidence intervals resample whole windows, because repos created in the same minutes can be related. Queries go through the GraphQL API, which also returns each repo's language byte counts and size [4]. - Population. All public, non-fork repos that GitHub search indexes, created in that calendar year (2026 runs to 2 November).
- Validation counting uses the same script as the calibration: shallow clone, non-blank lines in source files, with vendored folders and minified files excluded. Empty repos (0 KB) were left out of the validation because they have nothing to check.
- Age-matched follow-up. A random subsample of non-empty repos from the main sample (500 per year for 2016, 2018, 2020 and 2022–2025, and 750 for 2026). For each one, GraphQL gives the last commit on the default branch before 7, 90 and 365 days of age, plus the last 100 commits' authors and messages. The REST git trees API [7] gives every file's size at each snapshot. Code bytes are summed over programming and markup file extensions, excluding
node_modules/,vendor/and minified files. The README is the largest top-level file namedREADME*. - Error is the factor the estimate is off by, in either direction ("2×" = half or double). Bias is the median ratio of estimate to actual: above 1 means the model overestimates.
Limitations
- Repos are measured as they are today. A 2012 repo has had 14 years to grow or to be abandoned, while a 2026 repo is weeks to months old. The trend mixes "how big repos start" with "how much they grew since". The age-matched follow-up (What's behind the jump?) shows this matters little: most repos reach close to their final size within 90 days.
- Snapshots follow commit dates. The 7/90/365-day snapshots take the last commit dated before that age. Commit dates are set by the author's machine, and history can be rewritten, so a few snapshots are off. Repos created by importing old history count it from day one.
- AI-agent traces are a floor. Only tools that leave files or commit signatures are visible, and a trace added years later (an old repo picking up a
CLAUDE.mdin 2026) only counts for the "today" figures, not "by day 90". A.replitfile predates Replit's agent, and a commit message that merely mentions "Claude Code" counts as a trace; both are rare in the sample. - Survivorship. Deleted repos aren't in the sample. Older years only include repos that still exist, which probably skews them towards repos someone cared about.
- Search coverage. GitHub search excludes forks by default and may not index every repo. The population counts are search counts, not an official census.
- Validation is per bucket, not population-weighted. Each size bucket gets the same number of repos, so the overall validation error over-represents large repos compared to a random sample.
- Missing language stats on old, untouched repos. GitHub has no language stats for some repos that were never pushed to after the early 2010s, so the model can't see their code. This understates "has code" for early years; see the "No lang. stats" column and the validation table.
- Stars aren't comparable across years. Before 2012, GitHub's "watch" was what is now a star, and owners watched their own repos automatically; when watchers became stars, those carried over. So most pre-2012 repos have a star from their owner, and the "at least 1 star" line isn't a popularity measure for those years. (Inferred from GitHub's 2012 change, not verified repo by repo.)
- Disk size (KB) isn't comparable before 2016. The median repo size drops from ~140 KB (2015) to ~22 KB (2016) in one year, while estimated code barely changes, and every empty repo from 2010–2013 reports tens of KB (median 48 KB) where later empty repos report 0. This points to a change in how GitHub measures or stores older repos (not verified). The LOC estimate uses language bytes and isn't affected.
- Committed dependencies inflate the top end. GitHub's language stats count a committed virtual environment (
venv/) or similar copied-in libraries as the author's code, which our clone count excludes. In one 2024 validation repo, a committedvenv/made the estimate ~150,000 lines against 1,795 counted. Medians barely move, but p90, the 100k+ bucket and means are overstated. - 2026 is a partial year. It covers 1 January to 2 November 2026, and its repos are at most ten months old.
- Small validation cells. 17 repos per year and bucket give a rough per-cell error; the per-year totals are more reliable.
Validation repos
Sources
- Estimating a GitHub repo's lines of code without downloading it, this research's calibration study (250 repos), 2026-11-02.
- List repository languages, GitHub Docs: bytes of code per language. Accessed 2026-11-02.
- Understanding the search syntax, GitHub Docs: date and time qualifiers. Accessed 2026-11-02.
- Rate limits and query limits for the GraphQL API, GitHub Docs. Accessed 2026-11-02.
- Linguist: Overrides, GitHub Linguist: which files count toward language stats. Accessed 2026-11-02.
- Primary data: this study's validation clones and random samples, collected 2026-11-02.
- Get a tree, GitHub Docs: Git trees REST API (recursive file listing with sizes). Accessed 2026-11-03.
- AGENTS.md, an open format for instructions to coding agents, used by Codex, Cursor, Jules and others. Accessed 2026-11-03.
- Claude Code settings, Anthropic Docs: the co-authored-by attribution Claude Code adds to commits by default. Accessed 2026-11-03.
- Claude (language model), Wikipedia: Claude model release dates and Claude Code preview / general availability. Accessed 2026-11-03.
- OpenAI GPT Model Release Timeline, Hidekazu Konishi, updated 2026-10-20: GPT-4o through GPT-6.1 release dates; cross-checked with Wikipedia's GPT-6 page. GPT-5.3-Codex (5 February 2026) from third-party trackers only. Accessed 2026-11-03.
- Gemini (language model), Wikipedia: Gemini 2.5 Pro, 3 Pro and 4 (Argon) release dates. Accessed 2026-11-03.