# mongodb/mongo SLOC report

> As of 2026-09-16 (commit 0a68308f0d39), mongodb/mongo contains 8,405,704 total lines: 5,888,453 code, 1,510,023 comments, 1,007,228 blank, across 29,659 files in 54 languages (top: C++ 34.0%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

mongodb/mongo has 5,888,453 source lines of code out of 8,405,704 total lines across 29,659 files, counted from the 0a68308f0d39a928ed551f285ba72ca560c38576 ref at commit 0a68308f0d39 by the OctoCounts tokei engine on 2026-09-16. 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 mongodb/mongo to commit 0a68308f0d39, 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 70.1% of all lines, comments represent 18.0%, and the repository averages 199 code lines per file. C++ accounts for 34.0% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 5,741 | 2,741,390 | 2,002,507 | 366,624 | 372,259 |
| C++ Header | 7,247 | 1,720,576 | 1,260,735 | 248,718 | 211,123 |
| C Header | 5,798 | 1,638,797 | 959,034 | 488,768 | 190,995 |
| JavaScript | 6,436 | 847,280 | 601,674 | 135,534 | 110,072 |
| C | 842 | 753,097 | 562,134 | 126,963 | 64,000 |
| Python | 802 | 193,970 | 139,813 | 24,281 | 29,876 |
| Autoconf | 24 | 137,741 | 134,616 | 2,049 | 1,076 |
| YAML | 1,140 | 85,338 | 70,483 | 9,459 | 5,396 |
| Bazel | 293 | 64,580 | 59,072 | 1,587 | 3,921 |
| Bitbake | 16 | 36,585 | 36,444 | 14 | 127 |
| JSON | 179 | 13,475 | 13,474 | 0 | 1 |
| Scons | 116 | 11,792 | 8,523 | 1,368 | 1,901 |

Top language (C++ 34.0%). Generated at 2026-09-16T07:17:57.394612277+00:00. Canonical report: https://octocounts.com/github/mongodb/mongo

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/mongodb/mongo/commit/0a68308f0d39a928ed551f285ba72ca560c38576?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does mongodb/mongo have?

mongodb/mongo has 8,405,704 total lines, including 5,888,453 code lines, 1,510,023 comment lines, and 1,007,228 blank lines.

### How was the mongodb/mongo line count measured?

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

### What commit was counted for mongodb/mongo?

This OctoCounts report was generated from 0a68308f0d39a928ed551f285ba72ca560c38576 at commit 0a68308f0d39 on 2026-09-16T07:17:57.394612277+00:00.

## Similar repository reports

- [LibreOffice/core](https://octocounts.com/github/LibreOffice/core) — C++, 6,334,759 code lines
- [tensorflow/tensorflow](https://octocounts.com/github/tensorflow/tensorflow) — C++, 5,095,080 code lines
- [facebook/hhvm](https://octocounts.com/github/facebook/hhvm) — C++, 4,641,684 code lines
- [godotengine/godot](https://octocounts.com/github/godotengine/godot) — C++, 4,110,443 code lines
- [RosettaCommons/rosetta](https://octocounts.com/github/RosettaCommons/rosetta) — C++, 4,032,379 code lines
- [llvm/llvm-project](https://octocounts.com/github/llvm/llvm-project) — C++, 8,218,225 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)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Electron vs Tauri](https://octocounts.com/compare/electron-vs-tauri)
- [Godot vs Bevy](https://octocounts.com/compare/godot-vs-bevy)
- [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)
