Firms maximize profit (or minimize loss) by producing perfectly at the quantity where Marginal Revenue equals Marginal Cost (MR = MC).