Updated October 15, 2026 · Maintained by huanglizhuo

How many lines of code? The largest codebases, counted

Counted by OctoCounts with tokei 14.0.0 over each repository's default branch at a pinned commit (tests, docs, and generated files excluded): the Linux kernel has 32,360,324 code lines, Firefox 24,586,522, LLVM 8,307,824, TensorFlow 5,130,571, Godot 4,120,690, Kubernetes 3,901,619, PostgreSQL 1,631,788, and git 1,148,625. Every number below names its commit and date, so you can reproduce or update it.

The numbers, side by side

RepositoryCode linesTotal linesFilesTop language (share of code)Counted
torvalds/linux32,360,32442,580,02589,182C (60.8%)2026-10-14 @ 4056b3c9d3c9
mozilla-firefox/firefox24,586,52235,250,721140,115C++ (22.8%)2026-10-14 @ 3934f7874da5
llvm/llvm-project8,307,82411,548,76137,002C++ (67.2%)2026-10-14 @ 5ef967a9c367
tensorflow/tensorflow5,130,5716,835,03924,256C++ (56.2%)2026-10-14 @ 7bef9ab9883d
godotengine/godot4,120,6905,787,90911,416C++ (34.5%)2026-10-14 @ 5ec712e220b7
kubernetes/kubernetes3,901,6194,848,89214,992Go (65.9%)2026-10-14 @ 633270dea2b1
postgres/postgres1,631,7882,930,7564,132C (59.4%)2026-10-14 @ eab68b1be6aa
git/git1,148,6251,613,2773,554PO File (31.0%)*2026-10-10 @ a018953688f1

*git's largest counted "language" is PO File — its translation catalogs — a good reminder that SLOC tools count what the parser sees: C is the largest programming language in the tree, but the .po catalog lines are numerous enough to lead the table.

How these numbers were measured

Every figure comes from OctoCounts' own counting pipeline: the repository's default branch is resolved to an exact commit, the source archive of that commit is downloaded (no git history), and the tree is counted with tokei 14.0.0. The configuration for these reports excludes test, docs, and generated files, so "code lines" here means hand-written source lines — the conservative end of the range you will see quoted. Each row links to the full report with the per-language table, and recounting the same commit with the same options returns exactly the same numbers — the counting methodology documents the pipeline end to end.

How many lines of code is the Linux kernel?

32,360,324 code lines at commit 4056b3c9d3c9 (October 14, 2026) — 42,580,025 total lines including comments and blanks, across 89,182 files in 50 languages, C at 60.8% of code. The kernel's master branch advances daily, so treat the number as "the kernel in mid-October 2026," not an eternal fact; the commit-pinned report is the precise citation. It remains the largest public codebase most people can name, and the only one in this table where even the compressed source archive is a few hundred megabytes.

How many lines of code is Firefox?

24,586,522 code lines at commit 3934f7874da5 (October 14, 2026), across 140,115 files — the largest file count in this set — in 91 languages, the widest language mix here. C++ leads at 22.8% of code; comments are 19.9% of all lines, the highest comment share among the systems codebases measured. The full report shows why one-line comparisons of "Firefox vs Chromium" are treacherous: file counts and language mixes differ as much as line totals.

Which is the largest codebase ever?

There is no verified answer. "Largest" depends on what you count (code only, or comments and blanks? generated code? vendored dependencies?), and the biggest systems — automotive platforms, telecom switches, large SaaS monorepos — are not public. Among public GitHub repositories, the Linux kernel is the most-cited giant, and claims of "hundreds of millions of lines" for closed systems circulate without a reproducible methodology. For the largest repositories OctoCounts has actually measured, ranked and updated continuously, see the Hall of Monoliths.

Why do line counts for the same codebase differ between websites?

Four things move the number:

  1. The tool. wc -l counts every line in every text file; cloc, tokei, and scc split code from comments and blanks, each with its own language database (the tokei vs cloc vs scc comparison covers the differences).
  2. The options. Including or excluding tests, docs, generated files, and vendor folders can swing totals by 20–50% — OctoCounts' pilot study measured exactly how much on react and vite.
  3. The commit. A default branch moves daily; a count without a commit SHA describes a moving target.
  4. The date. Even with tool and commit fixed, a count from 2015 describes a different tree than one from 2026.

So the citable form is: tool + version + options + commit + date. "32,360,324 code lines of torvalds/linux at 4056b3c9d3c9, tokei 14.0.0, tests/docs/generated excluded, counted 2026-10-14" can be checked by anyone; "Linux has 32 million lines" cannot.

Does more code mean a worse codebase?

No — and this dataset is the argument. PostgreSQL averages 395 code lines per file with 30.3% of all lines being comments: dense, heavily documented code. Kubernetes averages 260 code lines per file at 80.5% code. The linux kernel averages 363 code lines per file across 50 languages. Size is an input to planning, budgeting, and the honest sanity check (“is this really too big to audit before we depend on it?”) — not a verdict on engineering quality.

If you cite these figures, credit OctoCounts and link the pinned report for each repository so readers can reproduce the numbers. The methodology page includes the recommended citation format.