# magento/magento2 SLOC report

> As of 2026-09-17 (commit ca7741c986e4), magento/magento2 contains 3,156,074 total lines: 1,947,193 code, 890,719 comments, 318,162 blank, across 31,568 files in 11 languages (top: PHP 69.9%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

magento/magento2 has 1,947,193 source lines of code out of 3,156,074 total lines across 31,568 files, counted from the ca7741c986e4dfb140f519ae29c826788036614c ref at commit ca7741c986e4 by the OctoCounts tokei engine on 2026-09-17. 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 magento/magento2 to commit ca7741c986e4, 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 61.7% of all lines, comments represent 28.2%, and the repository averages 62 code lines per file. PHP accounts for 69.9% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| PHP | 19,138 | 2,334,735 | 1,361,809 | 734,701 | 238,225 |
| XML | 8,884 | 409,962 | 321,152 | 69,990 | 18,820 |
| JavaScript | 1,224 | 238,849 | 164,523 | 44,492 | 29,834 |
| LESS | 467 | 82,274 | 61,928 | 7,416 | 12,930 |
| JSON | 320 | 21,262 | 21,262 | 0 | 0 |
| HTML | 372 | 12,569 | 8,350 | 3,704 | 515 |
| CSS | 68 | 5,545 | 4,823 | 166 | 556 |
| TypeScript | 1 | 3,238 | 3,238 | 0 | 0 |
| SVG | 20 | 108 | 108 | 0 | 0 |
| Markdown | 423 | 14,193 | 0 | 11,855 | 2,338 |
| Plain Text | 651 | 33,339 | 0 | 18,395 | 14,944 |

Top language (PHP 69.9%). Generated at 2026-09-17T18:08:18.123705820+00:00. Canonical report: https://octocounts.com/github/magento/magento2

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/magento/magento2/commit/ca7741c986e4dfb140f519ae29c826788036614c?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 magento/magento2 have?

magento/magento2 has 3,156,074 total lines, including 1,947,193 code lines, 890,719 comment lines, and 318,162 blank lines.

### How was the magento/magento2 line count measured?

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

### What commit was counted for magento/magento2?

This OctoCounts report was generated from ca7741c986e4dfb140f519ae29c826788036614c at commit ca7741c986e4 on 2026-09-17T18:08:18.123705820+00:00.

## Similar repository reports

- [moodle/moodle](https://octocounts.com/github/moodle/moodle) — PHP, 2,278,067 code lines
- [Dolibarr/dolibarr](https://octocounts.com/github/Dolibarr/dolibarr) — PHP, 1,490,070 code lines
- [symfony/symfony](https://octocounts.com/github/symfony/symfony) — PHP, 1,283,887 code lines
- [ccxt/ccxt](https://octocounts.com/github/ccxt/ccxt) — PHP, 2,653,324 code lines
- [WordPress/WordPress](https://octocounts.com/github/WordPress/WordPress) — PHP, 781,556 code lines
- [SuiteCRM/SuiteCRM](https://octocounts.com/github/SuiteCRM/SuiteCRM) — PHP, 727,112 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)
- [Laravel vs Django](https://octocounts.com/compare/laravel-vs-django)
- [Django vs Ruby on Rails](https://octocounts.com/compare/django-vs-rails)
- [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)
