📈
📈 Business tools

Cost Function Calculator (TC = a + bQ + cQ² + dQ³: AFC, AVC, ATC, MC)

Results update as you type.

Your numbers

Understanding the cost function calculator — concept and principle

This calculator evaluates a cubic short-run cost function TC = a + bQ + cQ² + dQ³ at a chosen output. It returns total and variable cost, average fixed, variable and total cost, marginal cost, and the output and price at minimum AVC and minimum ATC. Economics students use it to check cost-curve exercises; analysts use it with coefficients fitted to their own cost data.

Cost curve at Q = 40Cost curve at Q = 40: 1,000 + 1,280 = 2,280 (fixed + variable = total cost); AFC 25 · AVC 32 (per unit); MC = 40 (cost of one more unit) → ATC 57 (minimum ATC 55 at Q = 50)Cost curve at Q = 401,000 + 1,280 = 2,280fixed + variable = total costAFC 25 · AVC 32per unitMC = 40cost of one more unitATC 57minimum ATC 55 at Q = 50
Cost curve at Q = 40 — with the default inputs: ATC 57.

How it is calculated

Q is in units; costs are in whatever money unit the coefficients use.

The principle

A negative c and positive d give the classic U-shaped cost curves: costs per unit first fall as specialisation and better use of fixed inputs help, then rise as diminishing returns set in. Marginal cost is the slope of total cost. Whenever MC is below an average, it pulls the average down; above, it pulls it up. So MC crosses AVC and ATC exactly at their minimum points. For a competitive firm, minimum AVC is the short-run shutdown price and minimum ATC is the break-even price.

Worked example

Defaults: a = 1,000, b = 40, c = −0.6, d = 0.01, Q = 40.

  1. VC = 40 × 40 − 0.6 × 1,600 + 0.01 × 64,000 = 1,600 − 960 + 640 = 1,280; TC = 2,280.
  2. AFC = 1,000 ÷ 40 = 25; AVC = 1,280 ÷ 40 = 32; ATC = 2,280 ÷ 40 = 57.
  3. MC = 40 + 2(−0.6)(40) + 3(0.01)(1,600) = 40 − 48 + 48 = 40.
  4. Minimum AVC at Q = 0.6 ÷ 0.02 = 30, where AVC = 40 − 18 + 9 = 31.
  5. Minimum ATC: 0.02Q³ − 0.6Q² − 1,000 = 0 gives Q = 50, where ATC = 2,750 ÷ 50 = 55.
How Total cost TC(Q) changes with Output Q (units)How Total cost TC changes with Output Q1,0002,0003,0004,0005,0006,00010203040506080Example: 2,280Output Q (units)
Each point is the calculator re-run with only “Output Q (units)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Output Q (units)Total cost TC(Q)
101,350
201,640
301,930
402,280
502,750
603,400
805,480

How to read the result

At Q = 40, MC (40) is below ATC (57), so producing more would still lower average total cost, until Q = 50. If the market price is below 31, a competitive firm would do better to shut down in the short run; between 31 and 55 it covers variable costs but not all fixed costs; above 55 it makes an economic profit.

Common mistakes

Keep in mind: A cubic is a convenient model, not a law. Fitted coefficients are reliable only near the outputs in your data.

Frequently asked questions

Why does marginal cost cross average cost at its minimum?

Adding a unit that costs less than the average lowers the average; one that costs more raises it. The average is lowest where they are equal.

What is the shutdown price?

The minimum of AVC. Below it, revenue does not even cover variable costs.

How do I get the coefficients?

Fit a cubic regression to observed total cost at several output levels.

Sources: OpenStax, Principles of Microeconomics, section 7.2 "The Structure of Costs in the Short Run" · OpenStax, Principles of Microeconomics, section 8.2 "How Perfectly Competitive Firms Make Output Decisions"

Checked 9 Nov 2026. Cost definitions (TC = TFC + TVC, AFC, AVC, ATC; marginal cost cuts AVC and ATC at their minimum points): NCERT / CIET (India), Economics Class XII e-content module “Concept of Cost – Part 4”; OpenStax “Principles of Microeconomics”, section 7.2 “The Structure of Costs in the Short Run”. Marginal cost as the derivative of a polynomial cost function: A. Barkley, “The Economics of Food and Agricultural Markets”, section 3.5 “Monopoly Power” (Kansas State University Libraries, 2020).

📈 All business tools →🌍 Calculators by country →