Since profits are the difference between total revenues and total costs, this will be where the distance between the total revenue and total cost curves is the greatest, as shown in the following graph. This problem is solved using marginal analysis.
Profits are at a maximum where mrginal revenue equals marginal cost.
If marginal revenue is greater than marginal cost, profits are rising and have yet to achieve their maximum. If marginal cost is greater than marginal revenue, profits are falling and are beyond their maximum.