The production using U-shaped line is studied. This research presents the relationship among machining time, cycle time and production rate in a U-shaped line. The U-shaped line produces shafts by automated machines. In this paper when any production rate is given the U-shaped line always satisfies the production rate. An algorithm is developed for the determination of cycle time, the number of machines and workers of the U-shaped line in order to minimize the total machine capacity and the number of workers for any given production rate. The U-shaped line was successfully designed by applying the proposed algorithm.