Until recently, a private repository that wasn't part of a company sale had no resale market at all. That changed when AI labs started paying for training data they can't scrape: real, production-grade code with verifiable provenance. In 2026 there are now published price points, which means you can sanity-check any offer you get.
The bands we see
Across the appraisals we run and the deals visible in this market, prices cluster into recognizable bands. Ordinary but real production repositories start around $5,000. Modern, well-maintained repos typically appraise in the $10,000–$20,000 range. Legacy systems — older stacks, long histories, domains models have barely seen — run $10,000 to $100,000+, because age and obscurity are features here, not bugs.
Deals negotiated directly for unusual or deeply domain-specific code can land above all of these bands. The floor matters most for calibration: if someone offers you $500 for a real production codebase, you now know that's not the market.
What actually moves the number
Buyers do not pay per line. Lines of code is the weakest proxy in the whole appraisal, because it's the easiest to inflate and says nothing about whether the code ever ran. What grading rubrics in this market consistently reward:
- Production history. Code that shipped, served users, and accumulated years of commits, fixes, and refactors. The commit history itself is signal: it shows how real engineers actually work over time, which is exactly what labs want models to learn.
- Completeness. Tests, CI configuration, migrations, docs, issue-shaped context. A repo that carries its whole development story is worth more than a source dump.
- Runnability. Can a stranger build and run it? Repos that stand up with documented steps can be turned into training environments, not just text, and environments command a premium (more on that below).
- Rights cleanliness.You must actually own what you're selling. Solo-authored or company-owned code with clean contributor history clears fast. Anything with murky employer IP or copyleft entanglements gets discounted or rejected.
- Domain specificity. Another CRUD app is a commodity. Code from underrepresented domains — industrial control, healthcare integrations, trading infrastructure, embedded systems, niche file formats — is scarce in every training corpus, and scarcity is priced in.
Why runnable repos are worth more
The frontier of AI training has shifted from next-token prediction on text to reinforcement learning inside working software — "environments" where an agent can attempt tasks and be scored. Investors and labs have poured money into this: Prime Intellect raised $130M in 2026 for agent-training infrastructure, and multiple environment startups reached nine-figure valuations within a year of founding. A codebase that can be built, run, and tested isn't just text to imitate — it's a potential environment. That dual use is why runnability multiplies value instead of adding to it.
How to read an offer
Ask three questions. What exactly is licensed (training use vs. ownership transfer)? Is it exclusive? And what happens to the copy after evaluation? A non-exclusive training license that lets you keep shipping your product should be the default; if a buyer wants exclusivity, that's a separate, more expensive conversation. We wrote a full breakdown of the rights side in How to sell your code without losing it.
If you want a concrete number for your own repository, codebase.markets gives you an instant estimate range and a firm, human-reviewed quote within about two business days. Read-only, no obligation.