Marginal cost function is a derivative of the total cost function. The total cost of producing a good depends on how much is produced (quantity) and the setup costs. In economics, the variation of cost with quantity is called variable cost and the setup cost, which is the same regardless of the quantity produced, is called fixed cost.

The marginal cost function measures the extra amount of resources it takes to produce one more unit of good. Thus, as its name implies, marginal cost is calculated at the “margin,” a place of high interest for economic theorists. The marginal cost function of a firm is also its supply function.

Find the fixed cost by calculating how much it costs to set up a factory before production can begin. Include utility and any other costs that is independent of the quantity produced. Suppose the fixed cost equals five thousand dollars.

Determine the function for variable cost by calculating how much it costs to produce a quantity of good, but disregarding fixed costs. Suppose to produce Q amount, it costs Q^2 + 3Q thousand dollars.

Add fixed cost and variable cost to get total cost. In the example, total cost function is TC(Q) = Q^2 + 3Q + 7.

Take the first derivative of the total cost function to find the marginal cost function. In the example, dTC(Q)/dQ = 2Q + 3. Note that marginal cost function in unaffected by fixed cost.

Interpret the marginal cost function. In the example, an additional quantity produced increases costs by 2Q plus 3. Thus, the marginal cost of producing 11th unit equals 2 * 11 plus 3, which equals 25 thousand dollars.