# mongodb/mongo SLOC report

> As of 2026-08-31 (commit 248ca0ef42c2), mongodb/mongo contains 10,417,497 total lines: 7,507,958 code, 1,659,139 comments, 1,250,400 blank, across 38,931 files in 59 languages (top: C++ 33.8%). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving mongodb/mongo to commit 248ca0ef42c2, 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 72.1% of all lines, comments represent 15.9%, and the repository averages 193 code lines per file. C++ accounts for 33.8% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 7,814 | 3,349,478 | 2,540,928 | 333,481 | 475,069 |
| C++ Header | 9,830 | 2,183,443 | 1,623,209 | 293,947 | 266,287 |
| C Header | 6,946 | 1,859,784 | 1,158,086 | 478,126 | 223,572 |
| JavaScript | 8,157 | 1,371,334 | 1,032,056 | 193,461 | 145,817 |
| C | 878 | 788,858 | 585,246 | 135,424 | 68,188 |
| Python | 760 | 200,513 | 154,689 | 15,452 | 30,372 |
| Autoconf | 24 | 140,811 | 136,940 | 2,643 | 1,228 |
| Bazel | 1,197 | 108,450 | 95,558 | 3,610 | 9,282 |
| YAML | 1,625 | 82,373 | 67,764 | 9,881 | 4,728 |
| Bitbake | 16 | 37,247 | 37,104 | 14 | 129 |
| JSON | 185 | 19,563 | 19,562 | 0 | 1 |
| Shell | 362 | 22,233 | 15,516 | 3,292 | 3,425 |

Top language (C++ 33.8%). Generated at 2026-08-31T09:53:48.957915322+00:00. Canonical report: https://octocounts.com/github/mongodb/mongo

## Report FAQ

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

mongodb/mongo has 10,417,497 total lines, including 7,507,958 code lines, 1,659,139 comment lines, and 1,250,400 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 248ca0ef42c2, 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 master at commit 248ca0ef42c2 on 2026-08-31T09:53:48.957915322+00:00.

## Similar repository reports

- [llvm/llvm-project](https://octocounts.com/github/llvm/llvm-project) — C++, 8,172,173 code lines
- [LibreOffice/core](https://octocounts.com/github/LibreOffice/core) — C++, 6,587,027 code lines
- [oceanbase/oceanbase](https://octocounts.com/github/oceanbase/oceanbase) — C++, 6,357,450 code lines
- [tensorflow/tensorflow](https://octocounts.com/github/tensorflow/tensorflow) — C++, 5,062,672 code lines
- [facebook/hhvm](https://octocounts.com/github/facebook/hhvm) — C++, 4,624,518 code lines
- [godotengine/godot](https://octocounts.com/github/godotengine/godot) — C++, 4,078,750 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)
- [OctoCounts API docs](https://octocounts.com/docs/api)
