# python/cpython SLOC report

> python/cpython: 1,634,582 code lines at commit 5503a5e09977, counted with tokei-14.0.0 on 2026-10-21. Saved result 992f155686b7eb633f726bea050824f518986a29b8d9780236ceda483995041f.

python/cpython has 1,634,582 source lines of code out of 2,184,230 total lines across 3,376 files, counted from the main ref at commit 5503a5e09977 by the OctoCounts tokei engine on 2026-10-21. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving python/cpython to commit 5503a5e09977, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 74.8% of all lines, comments represent 11.0%, and the repository averages 484 code lines per file. C accounts for 31.0% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 483 | 654,644 | 506,240 | 83,240 | 65,164 |
| ReStructuredText | 802 | 529,240 | 376,061 | 0 | 153,179 |
| Python | 1,039 | 432,086 | 349,861 | 31,899 | 50,326 |
| C Header | 648 | 384,208 | 332,450 | 18,871 | 32,887 |
| XML | 61 | 31,375 | 31,294 | 18 | 63 |
| Visual Studio Project | 54 | 7,829 | 7,782 | 9 | 38 |
| Autoconf | 16 | 7,061 | 4,377 | 1,409 | 1,275 |
| TOML | 9 | 4,135 | 3,691 | 183 | 261 |
| JavaScript | 16 | 4,427 | 3,531 | 376 | 520 |
| HTML | 18 | 3,709 | 3,464 | 55 | 190 |
| CSS | 7 | 4,046 | 3,216 | 247 | 583 |
| JSON | 14 | 3,125 | 3,122 | 0 | 3 |
| Visual Studio Solution | 1 | 1,756 | 1,756 | 0 | 0 |
| Batch | 25 | 1,461 | 1,222 | 7 | 232 |
| SVG | 14 | 1,072 | 1,010 | 58 | 4 |
| MSBuild | 10 | 1,031 | 822 | 119 | 90 |
| Objective-C | 11 | 1,055 | 809 | 102 | 144 |
| Shell | 27 | 1,244 | 793 | 292 | 159 |
| Module-Definition | 4 | 568 | 546 | 0 | 22 |
| C++ | 2 | 683 | 545 | 56 | 82 |
| Kotlin | 5 | 577 | 444 | 62 | 71 |
| M4 | 1 | 794 | 408 | 320 | 66 |
| Makefile | 3 | 497 | 378 | 46 | 73 |
| INI | 8 | 285 | 171 | 55 | 59 |
| Bitbake | 2 | 162 | 134 | 18 | 10 |
| GNU Style Assembly | 3 | 134 | 123 | 6 | 5 |
| PowerShell | 2 | 250 | 110 | 106 | 34 |
| YAML | 2 | 108 | 90 | 7 | 11 |
| Fish | 1 | 75 | 45 | 17 | 13 |
| TypeScript | 2 | 41 | 35 | 0 | 6 |
| D | 1 | 22 | 19 | 1 | 2 |
| C Shell | 1 | 29 | 14 | 5 | 10 |
| CMake | 1 | 14 | 10 | 1 | 3 |
| Forge Config | 1 | 10 | 9 | 0 | 1 |
| Markdown | 39 | 7,853 | 0 | 6,050 | 1,803 |
| Plain Text | 43 | 98,624 | 0 | 97,134 | 1,490 |

Top language (C 31.0%). Generated at 2026-10-21T03:46:21.410482689Z. Canonical report: https://octocounts.com/github/python/cpython/commit/5503a5e0997740573b68d924535aa87ee4d36d79?reportId=992f155686b7eb633f726bea050824f518986a29b8d9780236ceda483995041f&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/python/cpython/commit/5503a5e0997740573b68d924535aa87ee4d36d79?reportId=992f155686b7eb633f726bea050824f518986a29b8d9780236ceda483995041f&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does python/cpython have?

python/cpython has 2,184,230 total lines, including 1,634,582 code lines, 240,769 comment lines, and 308,879 blank lines.

### How was the python/cpython line count measured?

OctoCounts resolved the public GitHub repository to commit 5503a5e09977, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for python/cpython?

This OctoCounts report was generated from main at commit 5503a5e09977 on 2026-10-21T03:46:21.410482689Z.

## Similar repository reports

- [postgres/postgres](https://octocounts.com/github/postgres/postgres) — C, 1,632,075 code lines
- [FFmpeg/FFmpeg](https://octocounts.com/github/FFmpeg/FFmpeg) — C, 1,584,680 code lines
- [xeonliu/FFmpeg-AVSPlus](https://octocounts.com/github/xeonliu/FFmpeg-AVSPlus) — C, 1,504,588 code lines
- [php/php-src](https://octocounts.com/github/php/php-src) — C, 1,798,608 code lines
- [qemu/qemu](https://octocounts.com/github/qemu/qemu) — C, 1,376,572 code lines
- [SanjeevBashyal/OpenFOAM](https://octocounts.com/github/SanjeevBashyal/OpenFOAM) — C, 1,371,094 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Neovim vs VS Code](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
