I am trying to generate a metric for a company cost savings goal. To do this, I want to estimate the savings we realized by using an open source web application rather than building it from scratch or buying a COTS solution. One step in the process is to estimate how much it would have cost us to develop the application ourselves. Unfortunately, I'm at a loss for a really simple way to do this without going through a full estimation process.

Since I have the source code, I would think there should be some heuristic that could give me a very rough estimate of developer hours needed to write it. Unfortunately, my web searches on the topic mostly turn up articles and opinions on how lines of code are not a good indicator of productivity or quality.

My best solution so far is to pick a number of lines a developer could write in a day and work out the number of developer hours from there. If I go with that method, I would like to have some (preferably research based) evidence to back up my claim of developer productivity.

The one thing I have going for me is that to generate my final metric, all I really need is a lower bound on the developer hours or cost of the project. The higher the estimate, the better my metric will be, but I would rather the estimation technique be unassailable than have a high number.

Is there a better way to estimate the value of an open-source project?

  • 2
    Estimating something like this to me seems like a complete guess. Java lines are far from created equal, developers are far from created equal, and testers are far from created equal.
    – Joseph
    Commented Jun 1, 2011 at 15:25
  • 1
    Lines of code don't indicate productivity or quality, but they do indicate effort. Make sure you account for all appropriate phases in that metric, not only writing code but all testing, debugging, etc. If your company has data on similar projects with cost and lines of code, you're in luck. Commented Jun 1, 2011 at 16:53
  • I added the metrics tag. Please retaliate as necessary.
    – Joey Adams
    Commented Oct 2, 2011 at 23:19

3 Answers 3


For a rough estimate, use the SLOCCount program written by David Wheeler - it will analyze the lines of code and use industry estimates on programmer productivity to give you an estimate of time and money it would take to build said software.

By default it uses the COCOMO model for cost estimates, but you can customize this.

  • 2
    This is exactly what I was looking for. I ran SLOCCount on the source tree and it popped out a number. Bonus points for being backed up by research too!
    – Al Crowley
    Commented Jun 1, 2011 at 15:40

Ohloh is a website that keeps track of many open source projects and calculates the estimated cost by using the basic COCOMO model.

With Ohloh, the number of lines in the codebase (which is used to calculate the man-months expended to produce the software) and the average cost of a developer, which appears to be set to a default value of $55000/year, but can be changed by the user.

Here are some examples of estimated costs by Ohloh:

  1. Apache HTTP Server -- estimated cost: about $15 million.
  2. Mozilla Firefox -- estimated cost: about $87 million.
  3. Linux Kernel 2.6 -- estimated cost: about $173 million
  4. OpenOffice.org -- estimated cost: about $428 million
  5. Apache Turbine -- estimated cost: about $2 million
  6. Apache Velocity -- estimated cost: about $665,000

But keep in mind that as with any software cost estimation technique, it is just that -- an estimate.


You might find ohloh.net useful. It evaluates open source projects. It might give you a starting value but also a method of evaluating open source projects



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.