The cell formation (CF) is one of the mostimportant steps in the design of a cellular manufacturingsystem (CMS), which it includes Machines’ grouping incells and part grouping as separate families, so that thecosts are minimized. The various aspects of the problemshould be considered in a CF. The Machine reliability andthe tool assigned to them are the most important problemswhich have to be modeled correctly. Another importantaspect in CMS is material handling costs that they consistof inter-cell and intra-cell movement costs. Moreover, setup and tool replacement costs can be effective in CFdecision making. It is obvious that CF cannot be completedwithout considering the number of demand. With consideringof all of the above aspects, an extended linear integerprogramming is represented for solving the cell formationproblem (CFP) in this study. The objective is to minimizethe sum of inter-cell movement, intra-cell movement, toolreplacement, Machine breakdown, and setup costs. In theother terms, for states that cost of movement is higher thantool-changing cost, although a part can have the inter-and/or intra-cell movements, the model tries to find a solutionwhich part is allocated to one cell and with changing thetools, processes of that part is completed. In addition, tovalidate the model and show its efficiency and performance, several examples are solved by branch and bound(B&B) method.