Main content

### Course: Microeconomics > Unit 6

Lesson 2: Production and costs in the short run- Fixed, variable, and marginal cost
- Marginal cost, average variable cost, and average total cost
- Graphs of MC, AVC and ATC
- Marginal revenue and marginal cost
- Short-run production costs: foundational concepts
- Marginal revenue below average total cost
- How costs change when fixed and variable costs change
- Graphical impact of cost changes on marginal and average costs
- Visualizing average costs and marginal costs as slope
- The structure of costs in the short run
- Short-run production costs

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Visualizing average costs and marginal costs as slope

Graphing variable cost, fixed cost and total cost. Created by Sal Khan.

## Want to join the conversation?

- When he explains the part where the programmers have less efficiency as he hires more and more programmers, is he describing the law of diminishing returns?(15 votes)
- Average Variable Cost and Average Total Cost curves have a negative slope at some points. Why are the values not negative in the table to reflect this negative slope?(8 votes)
- Excel displays negative numbers in parentheses (its an accounting cell format).

(50.00) = -50.00

(100.00) = -100.00(8 votes)

- This video must be watch before this https://www.khanacademy.org/economics-finance-domain/microeconomics/firm-economic-profit/average-costs-margin-rev/v/marginal-cost-and-average-total-cost(5 votes)
- This is certainly off topic, but I want to raise the question that was not addressed in these two videos. How many lines of code are required per month? In projects I've been involved with, the total lines of code required is estimated - usually with great precision by someone with experience. The amount of time available is determined, including time for testing and correcting at the module level and above. Only then would you determine staffing requirements, and if you had the situation Sal posited, but you needed 16,000 lines of code per month to meet the schedule, you would have to reorganize the project, or at least get a project manager with a better skill set for putting together the organization. Back to the question - what is the schedule requirement?(3 votes)
- Sal said we can also view the marginal cost on variable costs curve, but I calculate different value of slope on variable costs curve and total costs curve. Am I wrong?(2 votes)
- in this graph some of the independent values correspond to more than one "y"..(2 votes)
- No wonder this video is so long he needs to explain what a slope is to these not "idiots" but low IQ kids!(2 votes)
- How did Sal create this graph? I've created my own spreadsheet, similar to his but with different numbers, I just can't figure out how to graph it in excel.(1 vote)
- The type of graph Sal used was the scattered plot with lines. Here's a link to my Excel document with this type of graph:

https://www.dropbox.com/s/bgy3yhcl4ttpgf8/Khan%20Academy%20excel%20document.xlsx?dl=0

I hope this answered your question.(2 votes)

- how do I calculate the cost of debt(1 vote)
- The cost of debt is normally considered to be the interest rate for that debt.(1 vote)

- I'm guessing that around the world prices of gas, milk, certain types of meat, and eggs are all priced differently? If possible can I have a few of the variable prices?(1 vote)
- Yes, prices of everything vary from place to place. The price of gas can vary from one side of the street to the other side (though usually only by a penny or two at most). Price also varies with time, so any particular price someone gives here would be out of date shortly after they submit it.(1 vote)

## Video transcript

Voiceover: What I want to do in this video is look at the data from the last video and make sure we understand it in maybe a more visual way. What I've done is, in
this graph over here, I used the lines of code per month, so this right over here. I used this, or this was what I used on my horizontal axis, so I kind of, if you view it in terms of independent and dependent variables, I kind of made this the
independent variable now. Given a certain number of lines of code you want to produce per month, what is the fixed cost, the variable cost, and the total cost, so this is on this axis right over here. This is lines of code, lines of code per month per month, right over there, and then you see it
goes up to about 12,000, and we see that covers
the entire range of data that we would have to worry
about right over here. On the vertical axis, as I just alluded to, we are plotting the cost, so we're going to plot the fixed cost, the variable cost, and the total cost. We see that there in our little legend. The fixed cost, no matter how many lines
of code we've produced, this is a little bit different than the way we thought
about it in the last video. In the last video, we said, "How many programmers do we have, "and what is going to be our fixed cost, "our variable cost, our total cost?" Now we're thinking about it in terms of lines of code per month, but no matter how many lines of code per month we produce within reason, our fixed costs are the same, $15,000 per month for the office space, the food in the office, the water cooler, the project manager, things like that. We see it right over here. This pale green line,
that is our fixed cost. That is our fixed cost. No matter how many lines
of code we produce, we are using exactly $15,000 per month. This is $15,000 right over there. Then you have your variable costs in this orange color, so the variable costs in the orange color, and we can see how the points are plotted. When you have no lines of code per month, your variable costs are 0. That's this point right over there. When you have 4,000 lines of code, your variable costs are 10,000. That's that point right over there. When you have, let me pick up a random point over here, when you have 11,400
lines of code per month, your variable costs are 70,000. 11,400, let's see. This is about 11,000, 11,400, and your costs are $70,000. That's that point right over there. Then, finally, your total costs, or the sum of the fixed
plus the variable costs, and we've plotted this in this blue color, so the total costs, which is in blue right over here, it's really just the sum of
this green horizontal line and this orange line. Another way of thinking about it, take this orange line at any given point. That's the variable cost. Add the fixed cost, which is 15,000. It shifts you up to that blue line. So at any point, that
blue line is exactly, is exactly $15,000 higher. $15,000 higher than the orange line. You see it even over here, where it kind of bends back on itself. Then you're probably saying, "Well, why is it bending
back on itself like that?" And this goes straight
to what we talked about in the last video. That as we add more and more programmers, the average productivity
per programmer goes down because they have to
start meeting each other and coordinate with each other, and maybe they undo each other's work, and then there's some point at which, even when you add more resources, it actually decreases productivity. So we're adding more and more resources, and I don't have them plotted here, but we keep adding more
and more developers, and we get to this point where we're able to generate 11,400 lines of code per month, but then all of a sudden, as we add more developers, it still adds cost, because obviously they're
going to cost something. We have to pay their salaries and their insurance and all of that, but then our total productivity starts going down again. That's what we're seeing here when both the variable cost curve and our total cost curve
start curving back on itself. Now, with this plotted, what I want to think about visually, and especially in terms of slope, I encourage you to, if the term slope seems a
little bit foreign to you, there's tons of videos
on the idea of slope in the algebra playlist, but the slope is really
just how inclined a line is. For example, this line has a higher slope than this line right over there. That the way we measure it is our change in our vertical axis, so our change in our vertical axis, often given by a change in y, the triangles, that's the delta, Greek letter Δ, means change in Y divided by our change in, divided by our change
in our horizontal axis, that is change in X. So, slope is equal to Δy over Δx, and when you measure it this way, this line over here, it looks like it has about
the same change in x, but has a much lower change in y, lower change in y. So when you take this lower change in y divided by the same change in x, you're going to get a lower slope. If you had a line that
looked something like, if you had a line that looked something like this, then you have a much higher change in y, so your numerator is higher, a higher change in y, and you have a lower change in x. Your denominator's lower. That'll increase the
value of the quantity, so your change in x. This right over here is
going to be a high slope, a high slope. With that little primer out of the way on what a slope is, what I want to do is think about these average fixed costs, average variable costs, average total costs, and marginal costs in terms of slopes of these lines right over here. When you're looking at average, if we look at this point right over here, average fixed cost, $3.75. What that means is when we're producing 4,000 lines of code, 4,000 lines of code, our average fixed cost is $3.75, so I'm on the green line, actually. Let me use a green color right here. I'm on this green line right over here. To find that average, so that's our, that is our, that is our fixed cost. To find our average fixed cost, we want to divide our fixed cost, which is that height right over there. You want to divide it by
the total lines of code, and that gives us our fixed cost, our average fixed cost per line of code. We're taking a change in the vertical axis divided by our change in a
horizontal axis right there, so it's essentially giving
the slope of this line, just like that. It's giving the slope of that line, and that's this point right over here. When you go to this point right over here, you're saying, "Okay. "I'm producing 7,000 lines of code, "and it still costs me $15,000." That's $15,000. I divide my total change in fixed costs, divided by my or my total fixed cost divided by my total lines of code, divided by my total lines of code. I'm essentially getting the slope of, I know it's getting hard to see, the way I'm doing it. I'm essentially giving you the slope of, let me draw a little bit neater, this line right over here. You could see this line has a lower slope than the previous one, and that makes sense because the average fixed
cost per line of code should be going down. We have the same fixed cost and we're dividing it amongst more and more and more code. You can see if you go out here, and you do the slope from this point all the way over here, it's going to have even a little, even a lower slope, so let me clear this out of the way, so hopefully that makes sense. The fixed cost, at least for me, is maybe the easiest to understand. You're taking the same quantity, dividing it by more and more code, or by more and more developers. Now, the variable cost,
average variable cost, at any given point over here, we're taking the variable cost, and we're dividing it by
the total amount of code. So variable costs, over there it is $10,000, and we're dividing it
by 4,000 lines of code, so it is the slope of
this line right over here. When you go to 7,000 lines of code, you say, "Well, my total
variable cost is $20,000, "and I'm going to divide
it by 7,000 lines of code." So it is the slope of this
entire line right over here. I'm having trouble drawing these lines. It is the slope of this
line right over here. This is a curve, so the slope is different
here than it is over there. This line, when we're measuring the
average variable costs, we're measuring, you can imagine the average slope across from the beginning all
the way to this point right over here. Now, when you're doing
the average total cost, you're doing the same thing. The average total cost at that point is our total, total cost, so it's that, divided by, divided by the total code, so the total code. So it is the slope of this
line right over there. We see that, that slope,
when you start over here, when you start from this
point to that point, the slope goes down, but then we see the slope start going, it starts to go up again because we saw that the variables cost start increasing because we get less and less efficiency as we add more and more developers and attempt, at least, to write more code. Now, the marginal cost
is an interesting one. All of these other ones, we're taking our total cost, our total variable cost, our total total cost, our total fixed cost, and dividing by the total amount of code, so we're essentially
finding the slope of a line between these points and our origin. When you're doing the marginal cost, you're doing something different. Let me clear all of this out so that we can clear things up. Your marginal cost is you're measuring your change in total cost divided by, not your total total cost, you're doing your change in total cost divided by your change
in the lines of code. So, for example, that right over, let me do that in a more vibrant color. That marginal cost, that's at this point right over here, so let's say we're going to, we can do it with the variable cost curve or we could do it with
the total cost curve. i'll do it with the total cost curve, so it's this point right over here. What we're doing is, we're taking the change in total cost between the previous point. The previous point was there, so our change in total cost is just this part right over here, so this is our change in total cost, and we're dividing it by our change in the amount of code we produce. So we're dividing it by the change in, change in lines of code. So essentially, it's giving
us the slope of the line between the previous point
and the current point on the total cost curve. We could do it, so if we go right over here. Let me go to another arbitrary point that doesn't start from the beginning. Let's say we're looking
at this marginal cost. This was when we're talking about 10,600 lines of code, and our total cost was $65,000. So our total cost is $65,000, 10,600 lines of code. That's that point right over there. What this is measuring, it's our change in total cost since the last increment, so since the last increment, since the last point. It's our change in total cost. it's our change in total cost divided by the change in lines of code since the last point, so the change of lines
of code is just that, change in lines of code. Our marginal cost is this quantity divided by this quantity. It's the slope between these
two consecutive points. What the marginal cost is giving us, so I just want to make sure
we get everything clear, these average fixed, average variable, average total cost, that gives us a slope of the line between any of the points and the origin. The marginal cost is essentially giving us the slope of the curve between any two consecutive points on the total cost curve, or you could also view, because it's really just a shifted version of the variable cost curve, or you could do this as the same as the slope of the line between any two points on
the variable cost curve. This is an approximation you could do this as the average, and that's why I wrote average over here. This is the average slope of the curve between these two points.