Here's how to calculate marginal cost:

Identify total cost data: You'll need information on the total cost of production at different output levels. This data might come from accounting records or production cost estimates.

Calculate the change in total cost: For each increase in quantity, determine the corresponding change in total cost. This can be done by subtracting the previous total cost from the current total cost.

Calculate the change in quantity: Simply subtract the previous production quantity from the current production quantity.

Divide the change in total cost by the change in quantity: This will give you the marginal cost for that specific increase in output.
Here's the formula for marginal cost (MC):
MC = (Change in Total Cost) / (Change in Quantity)
Example:
Let's say a company produces shirts. Here's their data for total cost and quantity:
Change in total cost (for 50 units) = $1200  $1000 = $200
Change in quantity (for 50 units) = 150 units  100 units = 50 units
Marginal cost per unit = $200 / 50 units = $4
Therefore, in this example, the marginal cost of producing one additional shirt is $4 when production increases from 100 units to 150 units.
Important points to note:

Marginal cost is an estimate, especially when dealing with significant production increases.

Fixed costs (rent, salaries) typically don't change with small output variations. They are spread across all units produced, so their impact on marginal cost is negligible in the short run.

Marginal cost can help with pricing decisions, production planning, and understanding economies of scale