How much is my GitHub repo worth to AI labs?
Pangea pays $100 per million tokens of source and $40 per million of git history. What counts, what doesn't, and how to get your repo's figure in your browser.
Last checked October 26, 2026
A private repository is worth $100 per million tokens of source code plus $40 per million tokens of git history at the rates Pangea publishes, and Pangea’s own illustration is roughly $1,000 to $1,500 per repository at typical depth. A token is four bytes, so a line of code is about ten tokens and a million tokens is roughly 100,000 lines. The worth calculator counts your repositories in your browser and shows the source figure. Most of the money is in the history, which takes a script to count.
A thousand lines of source is worth about a dollar, and history pays on top
| Lines of code | Source tokens | Source value at $100 per million |
|---|---|---|
| 1,000 | 10,000 | $1 |
| 10,000 | 100,000 | $10 |
| 100,000 | 1,000,000 | $100 |
| 500,000 | 5,000,000 | $500 |
Those figures look small because the source is the smaller part. Git history is every earlier version of every file, on every branch and tag, and it is priced separately at $40 per million tokens. Across Pangea’s network 79% of the tokens are history (45.31 billion history, 11.8 billion source), and Pangea says “Git history carries most of the value”. A file edited fifty times carries fifty versions, and the source figure doesn’t show that.
githubworth.com estimates history from source size and commit count, with a published error band. Its worked examples: a repository with a million source tokens and 500 commits lands around $424, with a range of $187 to $1,331, and one with five million tokens and 3,000 commits around $3,893. Exact history needs pre.dev’s script, below.
Stars, forks and language don’t move the figure
The rate is per token, so a repository nobody has heard of lists at the same price as a popular one of the same size. What does move the outcome is the grade: before anything is licensed, an AI lab reviews a copy of each repository against a fixed rubric, and Pangea says the final value depends on that analysis and on buyer demand. The figure you see is a list price for a non-exclusive license, and the same code can be licensed to several labs.
Dependencies, build output and minified files count for nothing
pre.dev’s published counter, which Pangea’s pipeline runs, skips node_modules, vendor, dist, build, .git and the other dependency and build folders, bundle-named files such as app.min.js, and any file with a line of 100 KB or more. Docs, config and data files such as .md, .json and .yaml count, but only up to ten times the code beside them. Pangea also leaves generated files, vendored code, binaries, data dumps and third-party code out of the valuation. A repository that is mostly a framework scaffold and a vendor folder has little left.
You don’t have to clean any of this out first. Pangea asks for repositories as they are. The per-token pricing explainer has the full rules.
Three ways to get your own figure
- Connect GitHub, GitLab or Bitbucket. The calculator signs in through the host and prices the sizes it reports, so the source figure is an estimate. It also shows each repository’s commit count, which is the best quick sign of how much history there is.
- Pick a folder. Your browser counts the files with the same rules as pre.dev’s script, so the source figure is exact, and the count stays on your machine.
- Run pre.dev’s script. It counts source and history the way Pangea’s pipeline does, so this is the figure to trust. The calculator page shows the command.
Whichever route you take, the count and the repository names stay with you. The calculator sends us a count of repositories and a rounded total, so we can see whether the tool works, and never a name, a path or a token.
A repository that was ever public lists at zero
Pangea doesn’t take code that was public and later made private, forks of other projects, or work an agency wrote for a client. If your GitHub repository has been public at any point, the answer to “what is it worth” is zero through Pangea, however large it is. githubworth.com shows what a public profile’s code and history would list at if it had always been private, and says so on the page.
The figure is a list price, not an offer
Pangea calls its rates indicative. They can change on 30 days’ notice, never retroactively. After you connect Git, Pangea returns its own estimate, grades a scrubbed copy in a few hours to four weeks, and sends accepted repositories to labs in batches. Licensing typically takes 2 to 16 weeks and is not guaranteed. You’re paid within 15 days of a lab’s payment, once your tax and payout details are complete. Selling source code to AI companies walks through the whole sale.
Sources
- Pangea, code licensing for companies checked October 20, 2026
- pre.dev, code licensing estimate script (the counter Pangea's pipeline runs) checked October 19, 2026
- githubworth, how a repo is valued checked October 26, 2026
Buyers in this guide
More guides
- How per-token code pricing works
Code sells by the token, four bytes each: $100 per million of source and $40 per million of git history at Pangea's rates. The rules, with worked examples.
- Sell a private GitHub, GitLab or Bitbucket repo to AI labs
Pangea licenses private repos from all three hosts and pays per token. Who qualifies, how each host connects, and what to keep intact before you sign.
- Sell source code to AI companies: rates and rules
Private repos with full git history can be licensed to AI labs. What Pangea pays per token, what rules a repo out, and how a sale runs from estimate to payment.