This study investigates the effect of stocking density on production decisions and profitability of a two-site (nursery and grow-finish) swine facility. The relationship between stocking density and pig performance was evaluated using regression analysis and data from peer-reviewed journal articles. Based on the estimated ADG and ADFI equations, growth and cumulative feed intake functions incorporating the influences of space allowance and group size were mathematically derived. Using a profit maximization model, we found that the optimal pig flow strategy assumes that the system consists of a nursery building and two identical grow-finish buildings and all of the pigs in the nursery flow to the grow-finish buildings in rotation. The optimal days on feed are 60 days for the nursery and 121 days for the grow-finish pigs. The optimal space allowance is at the minimum space allowance levels required for pig welfare considerations in accordance with the European Communities' standard (0.32 m2/nursery-pig and 0.73 m2/finish-pig). The optimal group size is 70 and 100 pigs/pen for the nursery and grow-finish pigs, respectively. The optimal market weight is about 130 kg. The optimized wean-to-finish system allocates 18% of space to nursery and 82% of space to grow-finish of 1,700 m2 available to allocate, producing 5,408 marketed hogs a year and generating an annual profit of $101,248. The results suggest that the assumed minimum space allowance is the major influences of the optimization problem.