Cost Function Calculator

Total, marginal, and average costs at any output level.

-

Average total cost per unit

Estimates for planning only, not financial advice.

A cost function turns output quantity into every cost number that matters: total cost, marginal cost, and the three averages. With $10,000 of fixed costs and $25 of variable cost per unit, producing 1,000 units costs $35,000 total: $35 average total cost, $25 marginal and average variable cost, $10 average fixed cost. At a $45 selling price, profit is $10,000. This calculator decomposes all of it and shows how the averages move as output changes.

How to Use This Calculator

Enter fixed costs for the period (rent, salaries, insurance: everything that does not move with output), variable cost per unit (materials, direct labor, per-unit shipping), the quantity you produce, and the selling price per unit for the profit check. The results show total cost, marginal cost, ATC, AVC, AFC, total revenue, and profit. Change the quantity to watch average fixed cost fall and see where the economics improve.

1

Split costs honestly into fixed and per-unit variable. Misclassified costs corrupt every average.

2

Enter quantity and price. Read ATC against price: the gap is your per-unit profit.

3

Test higher and lower quantities. Watch AFC dilute and confirm price still clears AVC at low volumes.

The Cost Formulas

TC = FC + VC x Q MC = VC per unit (linear case) ATC = TC / Q = AFC + AVC AVC = VC x Q / Q = VC per unit AFC = FC / Q (falls as Q rises) Profit = (price - ATC) x Q

With linear costs, marginal cost equals variable cost per unit at every quantity: the 1,000th unit costs the same $25 as the first. Average total cost falls toward $25 as quantity grows because the $10,000 of fixed cost spreads thinner: at 100 units ATC is $125, at 1,000 it is $35, at 10,000 it is $26. That dilution is the entire logic of scale, and it is also why low-volume production is punishingly expensive per unit.

Worked Example

A workshop has $10,000 of monthly fixed costs and $25 of variable cost per unit. Producing 1,000 units: total cost is $10,000 + $25,000 = $35,000. Marginal cost is $25. ATC is $35, AVC is $25, AFC is $10. Selling at $45: revenue is $45,000, profit is $10,000, or $10 per unit. Drop output to 400 units: total cost is $20,000, ATC jumps to $50, and the $45 price now loses $5 per unit. Same costs, same price, different volume: profit flips to a $2,000 loss. Volume is doing quiet heavy lifting in every cost structure.

Cost Curves at a Glance

MeasureAt 400 unitsAt 1,000 unitsAt 5,000 units
Total cost$20,000$35,000$135,000
Marginal cost$25$25$25
Average total cost$50.00$35.00$27.00
Average fixed cost$25.00$10.00$2.00

The table is the economies-of-scale story in four columns: total cost rises linearly, marginal cost never moves, and average cost glides down as fixed costs dilute. Apply the shutdown rule with these numbers: keep producing while price covers the $25 AVC, exit in the long run if price cannot sustainably clear ATC. For the profit side of the same structure, our contribution margin calculator runs break-even from these inputs, our COGS calculator builds the variable side for product businesses, and our Cobb-Douglas calculator models the production technology underneath.

Estimates for planning only, not financial advice.

Frequently Asked Questions

What is a cost function?

A cost function relates total cost to output quantity: TC = fixed costs + variable cost per unit x quantity. With $10,000 of fixed costs and $25 per unit, producing 1,000 units costs $35,000. From this one function come marginal cost, average total cost, average variable cost, and average fixed cost: the full toolkit for production decisions.

What is marginal cost?

Marginal cost is the cost of producing one more unit: the derivative of total cost with respect to quantity. With a linear cost function, marginal cost is constant and equals the variable cost per unit: $25 in the example. With non-linear costs (overtime, congestion), marginal cost rises with output. Pricing and output decisions should follow marginal cost, not average cost.

What is the difference between ATC, AVC, and AFC?

Average total cost (ATC) is total cost per unit: TC/Q. Average variable cost (AVC) is variable cost per unit: VC/Q. Average fixed cost (AFC) is fixed cost per unit: FC/Q, which falls forever as output rises. ATC = AVC + AFC. At 1,000 units with $10,000 fixed and $25 variable: AFC $10, AVC $25, ATC $35.

Why does average total cost fall then rise?

At low output, spreading fixed costs over more units dominates and ATC falls. At high output, diminishing returns push marginal cost up faster than fixed-cost spreading helps, and ATC rises. The minimum point, where marginal cost crosses ATC from below, is the efficient scale: the cheapest per-unit output level. This U-shape is one of the most important curves in economics.

How do you find the minimum average cost?

Produce where marginal cost equals average total cost. Intuitively: if the next unit costs less than the average, it pulls the average down; if it costs more, it pulls it up; the minimum is where they cross. With linear costs MC is flat and ATC falls forever toward AVC, so the "minimum" is at infinite output: the model's way of saying linear costs imply bigger is always cheaper per unit.

What is the shutdown rule?

In the short run, keep producing if price covers average variable cost, even at a loss, because fixed costs are sunk and you lose less operating than shutting down. Shut down if price falls below AVC: each unit deepens the loss. In the long run, exit if price cannot cover ATC, since all costs become avoidable. These two rules organize almost all production decisions.

What are economies of scale?

Falling long-run average cost as output rises: bigger plants, specialization, and bargaining power. Diseconomies of scale are the reverse: coordination costs and bureaucracy pushing costs up past some size. The minimum efficient scale is the smallest output reaching the flat bottom of the long-run average cost curve. Industries with huge MES (chip fabrication, auto plants) tend toward few large firms.

How do fixed and variable costs differ in the long run?

In the short run, fixed costs (rent, salaried staff) cannot change and variable costs move with output. In the long run, all costs are variable: leases expire, plants can be sold, headcount adjusts. That is why the long-run cost curve sits below the short-run one: with time, you re-optimize everything. Never treat a "fixed" cost as permanent in strategic planning.

What is a cubic cost function?

A richer model: TC = a + bQ - cQΒ² + dQΒ³, which produces the classic U-shaped ATC and rising MC curves of textbooks. The quadratic term captures early increasing returns (specialization), the cubic term captures eventual diminishing returns (congestion). This calculator offers linear plus an optional curvature term so you can see the U-shape emerge from real parameters.

How do cost functions inform pricing?

Marginal cost sets the floor for rational pricing: never price below MC in the short run (except strategically, like loss leaders). Average total cost sets the long-run floor: persistent pricing below ATC means exit. The gap between price and MC is the markup, and its size reveals market power. Cost-plus pricing (ATC plus margin) is common but backwards: it ignores what customers will pay.