views:

280

answers:

2

How do I calculate development time (hours) using COCOMO2? I am trying to calculate the time (hours) a programmer will spend on a programming project using COCOMO2. Here is what I have so far but I am not sure if this is correct. I would prefer to calculate this by hand, rather than using an online calculator. Any assistance will be really appreciated:

Formula: PM = Coefficient * KLOC ^ (raised to the power of 1.01 + 0.01 * sum of 5 scale factors) * product of 17 cost drivers

Person Months (PM) = ?
Coefficient = 2.5 ?? (mixed experience team, is this coefficient correct?)
Thousand Lines of Code (KLOC) = 100
Sum of 5 Scale Factors = PREC 2.43 + PMAT 2.73 + TEAM 3.95 + FLEX 3.64 + RESL 3.38 = 16.13
Product of 17 scale factors = 17.32

Therefore, 2.5 * 100 ^ (1.01 + 0.01 * 16.13) * 17.32 = 9529.9

Is 9529.9 correct? What unit is it measured in? I am trying to get the hours spent on the project.

A: 

COCOMO2 (and COCOMO, for that matter) give output in man-months. One man-year = 12 man-months (obviously). Two men for one year = 24 man-months.

To convert that to man-hours, multiply by your organization's number of usable man-hours per man-month. Your accounting department can give you the number. (It is usually HIGHLY proprietary, as it is key to your estimating process and your corporate operating efficiency.)

In the United States, the nominal number of available non-overtime man-hours per year is given by 2080 - (vacation days + holidays + sick leave days)*8. That's 52 weeks * 40 hours/week, minus vacation, holiday, and sick leave. You may or may not want to include a few days for Natural Disaster contingency in that. Discuss it with your accounting department. If 12*your usable man-hours per month is significantly greater than the nominal number of available non-overtime man-hours per year, you are being set up to assume significant unplanned, unbudgeted, uncompensated overtime in your project estimate. (Yes, I have seen places that do this. Smart ones don't.)

It should also be noted that COCOMO and COCOMO2 assume that one month is about the same as another. This is DANGEROUS if you are getting close to the end of the calendar year, or if you are trying to estimate (and schedule) a short, small project. In the United States, 1 Nov - 31 Dec is not much more than one month, in terms of amount of work getting done.

Assuming you have chosen your various factors correctly, your math appears correct. It looks as though you are calculating 9530 person-months, or a little under 80 man-years, for your 100,000 lines of code project.

John R. Strohm
John Strohm, Thank you very much for taking the time to provide these real world examples. They were very helpful thanks!
01010011
+1  A: 

From the COCOMO II.2000.0 Model Manual:

In COCOMO II effort is expressed as Person-Months (PM). A person month is the amount of time one person spends working on the software development project for one month.

That paper is long and describes a lot of different factors. On the wikipedia page a form called Intermediate COCOMO is given which has 15 cost drivers, maybe that one is simpler. At http://csse.usc.edu/csse/research/COCOMOII/cocomo_downloads.htm there is a program you can download to calculate (not tested by me).

hlovdal
hlovdal,I cannot thank you enough for the wonderful pdf you recommended! I read it from beginning to end. It not only answered all of my questions, but it was surprising clear and straightforward. I wish I could rate you/your post up, but my rank is not high enough at the moment. Thanks once again.
01010011