Software cost estimation is a very important activity in software development, but the existing methods can not do it accurately. In particular, various methods are based on the data of some mature companies. As a result, they can’t be applied to many small- and medium-sized enterprises (SME) and can not meet the demands of the increasingly refined industries. Based on rough set theory, an algorithm generating from a structured cost estimation model is proposed in this paper. Taking advantage of rough set theory which can analyze and reason the data, some tacit knowledge is discovered and the characteristics of some potential laws are revealed, thus improving the accuracy of cost estimation and meeting the demands of general businesses.