Free tool
Codebase value calculator
A codebase value calculator that reads a public GitHub repository in your browser and estimates rebuild effort and cost with basic COCOMO.
Updated
Overrides the GitHub figure. Count source lines only, not dependencies.
Assumption used to turn GitHub's byte counts into lines.
Assumption: a loaded hourly cost of an engineer. Change it.
Estimated rebuild cost
Look up a repository
hours × cost per hour
Approximate lines of code
–
Effort
–
2.4 × (KLOC)^1.05
Schedule
–
2.5 × (effort)^0.38
Average team
–
effort ÷ schedule
What it would cost to write this much code again, not what anyone would pay for it.
Runs entirely in your browser. Nothing you type is sent to us or stored. The repository lookup goes straight from your browser to GitHub.
Runs in your browserBuilt and maintained by the DataBroker team
How to use the codebase value calculator
- Step 1
Paste a repository
Enter a public GitHub address such as github.com/owner/name and press Estimate. Your browser asks GitHub directly.
- Step 2
Adjust the assumptions
Change the bytes-per-line conversion or the hourly cost, or type a line count yourself for private code.
- Step 3
Read the estimate
See lines of code, effort in person-months, schedule, average team size and the rebuild cost.
What the result looks like

What is a codebase value calculator?
A codebase value calculator estimates what it would cost to write a piece of software again, from its size in lines of code, an effort model such as COCOMO, and an hourly engineering cost.
More about the codebase value calculator
The formula
Basic COCOMO, published by Barry Boehm in 1981, estimates effort from size alone. The calculator uses its organic mode, meant for small teams working on familiar problems.
| Step | Formula |
|---|---|
| Lines of code | GitHub language bytes ÷ bytes per line (default 40) |
| Effort (person-months) | 2.4 × (lines ÷ 1,000)^1.05 |
| Schedule (months) | 2.5 × effort^0.38 |
| Average team | effort ÷ schedule |
| Hours | effort × 152 working hours a month |
| Rebuild cost | hours × cost per hour (default $100) |
Example: a repository with 2 MB of code is about 50,000 lines at 40 bytes a line. Effort is 2.4 × 50^1.05, about 145 person-months; schedule is about 16.5 months with an average team of nearly nine; at $100 an hour that is roughly $2.2 million to rebuild.
What the number means and what it doesn't
The result is a replacement cost: what it might take to produce this much code again. It is not a sale price. Buyers pay for code that earns money, has users, and comes with clean ownership and licences. A huge codebase nobody uses can be worth less than a small one at the heart of a profitable product.
| Issue | Effect | What to do |
|---|---|---|
| Generated or vendored files | GitHub's language stats exclude most, but some slip through and inflate lines | Type a line count from your own tool such as cloc |
| Dense or verbose languages | 40 bytes a line is an average; some code is denser | Change the bytes-per-line assumption |
| Private repository | GitHub returns not found without signing in | Type the line count instead |
| Rate limit reached | GitHub allows 60 lookups an hour per network without an account | Wait for the reset time shown, or type the line count |
Sources
4 sources · checked Nov 7, 2026
Codebase value calculator FAQ
Does this tool see my code?
No code is downloaded. Your browser asks GitHub for the repository's public details and language byte counts only, and nothing passes through our servers.
Why $100 an hour?
It is an assumption for a fully loaded cost, meaning salary plus benefits, equipment and management. The US median wage for software developers is lower; change the figure to match your market.
Is COCOMO still accurate?
It is old and rough, but it is transparent and widely known. Treat the result as an order of magnitude rather than a quote.
Can I value a private repository?
Yes, by typing its line count. The tool never asks for a GitHub login.
Is this what a buyer would pay?
No. Buyers look at revenue, users, maintenance and legal ownership. The rebuild cost is one input to that conversation.
Related
Data value calculatorHow much is data worth to a buyer? Compare three standard estimates side by side, using your own figures and assumptions you can change.
PII scannerA PII scanner that runs in your browser: paste text or drop a file to see personal data and leaked secrets before you share it.
NDA generatorAn NDA generator for data deals: type the parties, purpose and terms, then download a one-way or mutual agreement as a PDF.
Guides that use the codebase value calculator
- Selling a company's workspace data to AI labs
Sell workspace data only after you know who buys it, what deals have paid, and what has to be stripped out before anyone sees it.
- How to sell software you have built
How to sell software you have built, whether that means the whole product, the IP, or licensing the codebase as training data.
Free tool
Try the codebase value calculator
A codebase value calculator estimates what it would cost to write a piece of software again, from its size in lines of code, an effort model such as COCOMO, and an hourly engineering cost.
- Free
- No sign-up
- Runs in your browser






