Production possibilities frontier (PPF) and opportunity cost calculator

Set the most of each good the economy can make and how far the frontier bows, or type in a table of points from your problem. Pick two points and you get what is given up to gain what, the cost of one more unit, and a graph that shows where the frontier is steep and flat.

Inputs

Use the schedule when your problem hands you a table. Use the curve to see the law of increasing opportunity cost, or to drag a frontier around.

Only the names and units on the axes and in the sentences change.

Where the frontier meets the horizontal axis: all resources on the horizontal good.

Where the frontier meets the vertical axis: all resources on the vertical good.

1 is a straight line, where every unit costs the same. 2 is an ellipse. The more it bows out, the faster the cost of one more unit rises.

The amount of the vertical good follows from the frontier.

Optional. Enter both numbers to see whether a combination is on the frontier, inside it or out of reach.

Opportunity cost of moving from A to B

31.65units of good Y

Moving from A to B you gain 40 units of good X and give up 31.65 units of good Y. The opportunity cost of the gain is what is given up.

Point A
(40, 91.65)
Point B
(80, 60)
Cost of one unit of good X
0.791 units of good Y
Cost of one unit of good Y
1.26 units of good X
Slope at A · at B
0.436 · 1.33
Frontier
(x ÷ 100)² + (y ÷ 100)² = 1
Production possibilities frontier
  • Production possibilities frontier
  • Point A (40, 91.65)
  • Point B (80, 60)

Drag the round knobs at the ends of the curve to stretch it, the ring to bend it, and the two points to move along it. On a keyboard, tab to a knob and use the arrow keys.

The frontier meets the horizontal axis at 100 units of good X and the vertical axis at 100 units of good Y, bowed out (bow 2), so each extra unit of good X costs more good Y than the last. Moving from point A (40, 91.65) to point B (80, 60) you gain 40 units of good X and give up 31.65 units of good Y, which is 0.791 good Y for each unit of good X. The slope, the cost of one more unit of good X, is 0.436 at A and 1.33 at B.

How to read this graph

  • The black line is the frontier. It shows the most of one good you can make for each amount of the other. Everything under it (the shaded area) can be made; nothing above it can.
  • A and B are two points on the frontier. Drag them along it, or type how much of the horizontal good each one makes. The vertical good follows from the curve.
  • The dashed right-angle path is the move from A to B. The number along the bottom is what you gain of the horizontal good; the number up the side is what you give up of the vertical one. That second number is the opportunity cost of the first.
  • The round knobs at the ends stretch the frontier, and the ring in the middle bends it. A bow of 1 is a straight line, where every unit costs the same. The more it bows, the faster the cost of one more unit rises.
  • In schedule mode your typed points are joined in order, with a dot at each one. The calculator walks along them and tells you whether each step costs more than the last.

How it works

frontier from a formula, with k ≥ 1 (k = 1 is a straight line):
(x ÷ X)^k + (y ÷ Y)^k = 1        X, Y = the most of each good
cost of one more unit of the horizontal good, in the vertical good (the slope):
−dy/dx = (Y ÷ X) × ((x ÷ X) ÷ (y ÷ Y))^(k − 1)
moving from (x₁, y₁) to (x₂, y₂):
gain = x₂ − x₁       give up = y₁ − y₂
cost of one unit of x = (y₁ − y₂) ÷ (x₂ − x₁)       cost of one unit of y = (x₂ − x₁) ÷ (y₁ − y₂)
  • The two costs are reciprocals. If one corn costs 4 barrels of oil, one barrel of oil costs 1/4 bushel of corn.
  • On a straight frontier the cost is Y ÷ X everywhere. On a bowed one it starts low near the vertical axis and climbs, which is the law of increasing opportunity cost.
  • A typed schedule is read as it stands. Each step’s cost is the drop in the vertical good divided by the gain in the horizontal one. If the costs rise from step to step, the frontier bows out; if they are equal, it is straight.
  • Moving away from a point inside the frontier can cost nothing: you can get more of a good without giving up any of the other.
  • Quantities carry no units. Bushels and barrels, runners and shot putters all work, and only the labels change.

Worked example

OpenStax’s Saudi Arabia: with 100 worker hours it can make 100 barrels of oil or 25 bushels of corn, and a barrel of oil takes 1 hour while a bushel of corn takes 4. Before trade it makes 60 barrels and 10 bushels (point C). Open it in the calculator with corn across to 25, oil up to 100, a bow of 1, A at 10 bushels and B at 25.

  • Point A is 10 bushels of corn and 100 − 4 × 10 = 60 barrels of oil, which is OpenStax’s point C.
  • Moving to B (all corn, 25 bushels) gains 15 bushels and gives up all 60 barrels.
  • Opportunity cost: 60 ÷ 15 = 4 barrels of oil for each bushel of corn. The other way round, a barrel of oil costs 1/4 bushel. Both match OpenStax’s Table 33.4.
  • The United States makes 50 barrels or 100 bushels, so one barrel costs it 2 bushels and one bushel costs it 1/2 barrel. Saudi Arabia gives up less to make oil, and the United States gives up less to make corn.

More to try:

  • Montana State, Ted the trainer: shot putters across to 5, runners up to 15. Going from 0 to 2 shot putters gives up 6 runners, 3 for each. Type 3 and 2 into the check boxes to see that point sit inside.
  • Econ Isle’s curved frontier, as a table: widgets across, gadgets up. Going from B to C gives up 4 gadgets for 2 widgets, where the first 2 widgets cost 2 and the last 2 cost 6. The costs rise, so it bows out.
  • The default bowed curve: A at 40 and B at 80 on a frontier with 100 at each end. The cost per unit between them is 0.79, but the slope is 0.44 at A and 1.33 at B.

Tips

  • Say which axis is which. The horizontal good is the one you are gaining when you move right. Swap the axes and the costs flip to their reciprocals.
  • Between two points, use the average; at one point, use the slope. The page shows both, because textbooks ask both questions.
  • A frontier from a table has no curve between the points. The straight segments are only a guide. If your problem gives more points, add them.
  • The curve here is one family of bowed shapes. Real textbook frontiers are drawn by hand, so if a typed table disagrees with a drawn curve, trust the table.
  • Related ideas elsewhere on the site: the supply and demand studio shows how a market sets prices, and the GDP deflator calculator separates real output growth, the thing a frontier shifting outward stands for, from price rises.

FAQ

What is opportunity cost on a production possibilities frontier?

It is what you give up of one good to get more of the other. Moving along the frontier, more of one good means less of the other, so the amount of the vertical good lost for each extra unit of the horizontal good is the cost of that unit. OpenStax puts it as the slope of the frontier, the rise over the run. Montana State’s example shows both sides of it with Ted: 6 runners given up for 2 shot putters is 3 runners for each shot putter, and each runner costs 1/3 of a shot putter.

Why is the frontier curved, and when is it a straight line?

A real frontier usually bows out because resources are better suited to some goods than others. The first resources moved to a new good are the best fit for it, so little is lost; the last ones are the worst fit, so a lot is lost. That is the law of increasing opportunity cost, and it is why the slope is flat near the vertical axis and steep near the horizontal one. A straight frontier means every unit costs the same. OpenStax draws straight ones in its trade chapter because they simplify the arithmetic, and says they are a less realistic model.

What do points inside and outside the frontier mean?

A point on the frontier uses all the resources well. A point inside can be made, but there is room to make more of one good, the other or both, so resources are unused or wasted (OpenStax calls this productively inefficient). A point outside cannot be made with the resources and technology the frontier assumes. In the Montana State example, 3 shot putters and 2 runners is inside Ted’s frontier. Type a combination into the check boxes to see where it falls.

How do I find the opportunity cost between two points?

Subtract to find how much of each good changes, then divide the amount given up by the amount gained. Between two points on a bowed frontier that is an average over the stretch; the slope at each point is the cost of one more unit at that point, and the average falls between the two. The calculator gives the total given up, the cost per unit both ways round, and the slope at each point.

How does this connect to comparative advantage?

A country has a comparative advantage in the good it can make at the lower opportunity cost. In OpenStax’s example Saudi Arabia gives up 1/4 bushel of corn per barrel of oil and the United States gives up 2, so Saudi Arabia has the comparative advantage in oil, and the United States in corn, where it gives up 1/2 barrel per bushel against Saudi Arabia’s 4. Put each country’s two ends into the calculator to see the costs.

What makes the whole frontier shift?

More resources, or better technology, push it outward, so more of every combination can be made; losing resources pulls it in. OpenStax gives growth in resources and technology as the reasons it moves out, and Montana State’s question about a failed computer shows it moving in. Moving a point from inside to the frontier is different: it uses resources better without shifting the curve. This calculator draws one frontier at a time, so to compare, change the ends and read the new result.

Sources

  1. 2.2 The Production Possibilities Frontier and Social Choices, OpenStax, Principles of Economics 3e (Rice University). The slope of the frontier is the opportunity cost, the law of increasing opportunity cost (why the curve bows out), productive efficiency and a point inside the curve. It gives no numbers, so the figures below come from the next sources.
  2. 33.1 Absolute and Comparative Advantage, OpenStax, Principles of Economics 3e (Rice University). Straight-line frontiers for oil and corn with real numbers. Saudi Arabia makes 100 barrels of oil or 25 bushels of corn, the United States 50 barrels or 100 bushels, and the opportunity costs are 1/4 and 4 (Saudi Arabia) and 2 and 1/2 (United States).
  3. 2.1 How Individuals Make Choices Based on Their Budget Constraint, OpenStax, Principles of Economics 3e (Rice University). Alphonso’s burgers and bus tickets: one more burger always costs four bus tickets, the straight-line case of constant opportunity cost.
  4. Economics 101 Practice Homework: Production Possibilities (answers), Montana State University, Economics 101 (Prof. Stock). Ted’s frontier S = −(1/3)R + 5 (a table from 15 runners to 5 shot putters, 6 runners given up for 2 shot putters, 3 runners for each) and a point inside it; William and Calvin’s food and cloth.
  5. The Production Possibilities Frontier: Increasing Opportunity Cost (video transcript), Federal Reserve Education. Econ Isle’s gadgets and widgets. On a straight frontier 2 widgets always cost 4 gadgets; on the curved one they cost 2, then 4, then 6.

Formula and sources last checked September 30, 2026. How we test formulas.