←

Dev Value Hub

What would it cost to rebuild a GitHub repository (or a whole account) from scratch? Live GitHub data, estimated lines of code, the COCOMO effort model and real US developer rates.

Replacement-cost estimate, not a market value. It estimates the labour to re-write the code. It says nothing about sale value or revenue, and nobody is owed money because of it.

1. Repository or account

Each repository costs 1 GitHub request. Most recently pushed first.

GitHub API: limit not checked yet (60 requests/hour without a token).
Optional: GitHub token for a higher limit

Create a fine-grained token with read-only public access and nothing else. It is kept only in this tab's sessionStorage and sent only to api.github.com.

No token in use (60 requests/hour per IP address).

2. Rate & model

Lines ≈ GitHub bytes ÷ this. An assumption, not a standard.

How this works & sources
  1. Code size (estimated). GitHub's languages endpoint returns bytes of code per language (vendored and generated files mostly excluded by Linguist). Lines ≈ bytes ÷ 40 by default, our rough assumption for source code with indentation and comments. For an exact size run scc or cloc and type the “code” line count into Known lines of code.
  2. Effort. Basic COCOMO (Boehm, 1981): person-months PM = a·KLOCb (organic a=2.4 b=1.05; semi-detached 3.0/1.12; embedded 3.6/1.20), schedule = 2.5·PMd. COCOMO II.2000 nominal: PM = 2.94·KSLOC1.0997, schedule = 3.67·PM0.3179 (model manual). Hours = PM × 173.3 (2,080 h ÷ 12).
  3. Cost = hours × hourly rate. Default rate = BLS median wage for software developers ($65.38/h, May 2025) ÷ 0.70 (wages are 70% of employer cost, BLS ECEC) = $93.40/h employer cost. Presets: US freelance $60 / $95 / $130 per hour. Worked example: 10,000 lines, organic → 2.4 × 101.05 = 26.93 PM = 4,668 h × $93.40 = $435,991.
  4. Range. “Rate range” = the same hours at the BLS wage ($65.38) up to senior freelance ($130). Basic COCOMO itself is only within a factor of 2 about 60% of the time, so treat any figure as an order of magnitude.
  5. Limits. Line counts reward verbose code and ignore design, research, testing, data and maintenance. Generated or copied code inflates the result. Not an appraisal, tax or accounting advice, or an offer.
  6. Privacy & limits. Requests go straight from your browser to api.github.com. Without a token GitHub allows 60 requests/hour per IP (docs); one repository uses 4 requests, an account 1 + one per repository.

Rate sources