Profit peaks exactly where making one more unit stops adding money. In calculus terms, that is where the derivative of profit is zero.