# Grafana vs Kibana: source lines of code compared

The Grafana vs Kibana comparison on OctoCounts shows side-by-side source line counts for grafana/grafana and elastic/kibana, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-20, grafana/grafana contains 4,445,772 total lines (3,824,008 code) across 20,552 files, while elastic/kibana contains 13,235,241 total lines (10,770,625 code) across 103,308 files as of 2026-09-16. elastic/kibana is about 2.8x the size of grafana/grafana by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [grafana/grafana](https://octocounts.com/github/grafana/grafana) | [elastic/kibana](https://octocounts.com/github/elastic/kibana) |
| --- | ---: | ---: |
| Files | 20,552 | 103,308 |
| Total lines | 4,445,772 | 13,235,241 |
| Code lines | 3,824,008 | 10,770,625 |
| Comment lines | 240,506 | 1,212,222 |
| Blank lines | 381,258 | 1,252,394 |
| Languages counted | 12 | 12 |

Top languages in grafana/grafana: JSON (33.8% of code), Go (31.1% of code), TypeScript (16.3% of code). Top languages in elastic/kibana: TypeScript (56.5% of code), TSX (28.3% of code), JSON (7.6% of code). JSON, TypeScript, TSX appear in both top language lists; Go, SVG appear only in grafana/grafana's top languages; YAML, JavaScript appear only in elastic/kibana's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. grafana/grafana was counted at ref main (commit 39703a2c01e3) on 2026-09-20; elastic/kibana was counted at ref c899408d34b3083aebe112bb3a2806470535685a (commit c899408d34b3) on 2026-09-16. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

grafana/grafana counts the Grafana repository: the server backend, the frontend, and a large set of in-tree plugins. elastic/kibana counts the Kibana repository: the data-visualization application for the Elastic Stack, including its own plugin modules. Both are full application monorepos rather than libraries, counted on the dates shown above.

The per-language tables reflect each project's shape directly: Grafana's counted code is split between a Go backend and a TypeScript frontend, while Kibana's counted code is predominantly TypeScript for the application and its plugin surface.

Both counts include in-tree plugin and module code, so each total substantially measures extension surface maintained inside the main repository, not only the core application.

_These counts describe the visualization applications only. Query execution happens in the data sources they connect to, so neither number says anything about search or analytics engine capability._

Sources: [grafana/grafana repository (backend, frontend, and in-tree plugins)](https://github.com/grafana/grafana) · [elastic/kibana repository](https://github.com/elastic/kibana). Statements verified 2026-09-16.

Evidence and next steps:

- [grafana/grafana SLOC report](https://octocounts.com/github/grafana/grafana)
- [elastic/kibana SLOC report](https://octocounts.com/github/elastic/kibana)
- [Compare grafana/grafana and elastic/kibana interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fgrafana%2Fgrafana&right=https%3A%2F%2Fgithub.com%2Felastic%2Fkibana)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, grafana/grafana or elastic/kibana?

elastic/kibana has more code: 10,770,625 code lines versus 3,824,008 for grafana/grafana, about 2.8x as much, based on cached OctoCounts reports as of 2026-09-20.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for grafana/grafana, elastic/kibana, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. grafana/grafana was counted at ref main (commit 39703a2c01e3) on 2026-09-20; elastic/kibana was counted at ref c899408d34b3083aebe112bb3a2806470535685a (commit c899408d34b3) on 2026-09-16. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [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)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [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)
- [OctoCounts API docs](https://octocounts.com/docs/api)
