How can any firm find the right production level which guarantees maximum profit (or minimum loss)? Firms continue to produce up until the quantity at which the revenue from the last unit produced equals its cost. Therefore it should continue producing while the profit of the last unit produced is positive.