In this paper, we assess the impact of farm size on the production cost and evaluate the marginal costs and margins by taking into account that input prices may change with the scale of production. By using French data at the hog farm level, we estimate a system of equations including feed price equation, input demand functions, a output supply function based on a technology approximated by a combined generalized Leontief‐Quadratic form. Our results suggest the marginal costs are over‐estimated whether the endogeneity of feed prices is not controlled for. We show also that cost economies associated with output size are related to lower feed prices and not to a better use of labor. More specifically, cost economies for large farms (enjoying highest levels of profits) arise from feed prices and not by technological scale economies. In contrast,farms with no hired labor exhibit technological scale economies and reach higher pricecost margins than the larger farms.