# sagemath/sage SLOC report

> As of 2026-08-27 (commit 8bed9c3744bf), sagemath/sage contains 2,907,138 total lines: 2,624,400 code, 117,143 comments, 165,595 blank, across 4,444 files in 29 languages (top: Python 72.7%). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving sagemath/sage to commit 8bed9c3744bf, 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 90.3% of all lines, comments represent 4.0%, and the repository averages 591 code lines per file. Python accounts for 72.7% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Python | 2,503 | 2,080,390 | 1,908,880 | 65,644 | 105,866 |
| Cython | 1,317 | 722,353 | 647,419 | 28,534 | 46,400 |
| C++ | 64 | 44,374 | 29,602 | 9,764 | 5,008 |
| C Header | 258 | 13,668 | 8,284 | 3,191 | 2,193 |
| Meson | 116 | 7,873 | 7,231 | 194 | 448 |
| YAML | 17 | 6,728 | 6,666 | 47 | 15 |
| M4 | 46 | 6,913 | 4,461 | 1,970 | 482 |
| C | 8 | 2,574 | 1,922 | 325 | 327 |
| C++ Header | 4 | 2,424 | 1,732 | 292 | 400 |
| JSON | 3 | 1,633 | 1,632 | 0 | 1 |
| INI | 9 | 1,999 | 1,275 | 550 | 174 |
| BASH | 6 | 1,515 | 1,116 | 219 | 180 |

Top language (Python 72.7%). Generated at 2026-08-27T20:19:22.065470656+00:00. Canonical report: https://octocounts.com/github/sagemath/sage

## Report FAQ

### How many lines of code does sagemath/sage have?

sagemath/sage has 2,907,138 total lines, including 2,624,400 code lines, 117,143 comment lines, and 165,595 blank lines.

### How was the sagemath/sage line count measured?

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

### What commit was counted for sagemath/sage?

This OctoCounts report was generated from develop at commit 8bed9c3744bf on 2026-08-27T20:19:22.065470656+00:00.

## Similar repository reports

- [pytorch/pytorch](https://octocounts.com/github/pytorch/pytorch) — Python, 2,500,791 code lines
- [apache/airflow](https://octocounts.com/github/apache/airflow) — Python, 1,638,519 code lines
- [home-assistant/core](https://octocounts.com/github/home-assistant/core) — Python, 1,513,961 code lines
- [comet-ml/opik](https://octocounts.com/github/comet-ml/opik) — Python, 1,383,746 code lines
- [nousresearch/hermes-agent](https://octocounts.com/github/nousresearch/hermes-agent) — Python, 1,355,060 code lines
- [NousResearch/hermes-agent](https://octocounts.com/github/NousResearch/hermes-agent) — Python, 1,328,667 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)
- [Django vs Ruby on Rails](https://octocounts.com/compare/django-vs-rails)
- [Laravel vs Django](https://octocounts.com/compare/laravel-vs-django)
- [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)
