The aim of the present study was to design a mathematical model that can be used when deciding to choose a milking parlor. The proposed model has been tested in the conditions of agricultural production in Egypt and can be easily updated and adapted to different conditions. The mathematical model was basically validated with some results of measurements on three farms of different sizes for milking parlors and could be easily adapted to changing conditions. The results of the model showed that in case of a farm that contains 250 cows, the number of hours needed for milking per day is 12 hours, and the design of the milking parlor (2x8). In case of a farm that contains 500 cows, the number of hours required for milking per day is 15 hours, and the milking parlor design is (2x14). While, in case of a farm that contains 1000 cows, the number of hours required for milking per day is 18 hours, and the design of the milking parlor is (2x22). The results also showed that by increasing the capacity of the dairy farm it was possible to reduce the final annual costs of milking costs, whereby if the difference between a farm containing 250 cows and 1,000 cows was compared, it was observed that the final annual costs of milking per cow were reduced by 22 %. From the application of the model, it was found that the milking parlor could be improved, with reducing the total annual final costs of milking per cow by 30 %.