Average fixed, variable and marginal costs
Fixed, Variable, and Marginal Cost. Thinking about average fixed, variable and marginal cost
⇐ Use this menu to view and help create subtitles for this video in many different languages.
You'll probably want to hide YouTube's captions if using these subtitles.
- We here at the Khan Academy
- are working on some type of a software project,
- and we need to think about,
- What's the optimal number of programmers we should hire?
- And we think about how much productivity
- we're getting per programmer when we are working on this software project
- And so what I've done over here, this is a spreadsheet
- So I'm not gonna be able to write
- I'm only able to type
- This is Microsoft Excel right over here
- In this column I have the different numbers of programmers
- And then let's say based on other studies
- or industry studies or past experience
- this tells us how many lines of programming code
- we can get per month
- And obviously lines of code isn't maybe the best way to measure things
- because someone can write good lines
- or bad lines of code
- But let's just say this is one way of measuring
- productivity for software engineers
- So the first thing I wanna think about is
- What are my fixed costs?
- What am I going to spend
- no matter how many software engineers I hire for this project
- And for the sake of this video, my fixed costs will be
- the office space, and the electricity
- And let's assume I just have a
- a huge, an office that can accommodate any number of the programmers
- So that's a fixed cost, that's not going to change
- Depending on the number of programmers that I have
- And then the other fixed cost, let's just say I have a project manager for this project
- That I'm going to pay her salary
- to essentially help spec out what this software should actually do
- So her salary, let's just say $10,000 a month
- and then another $5,000 a month in office space for everybody
- So it's gonna come out to $15,000 a month
- And that's not gonna change regardless of however many programmers I have
- So I'm gonna go in Excel
- I'm gonna go to this little bottom right right over here
- I'm gonna drag that down
- And so it's gonna be fifteen thousand dollars in fixed costs
- No matter how many programmers I end up hiring
- Now the variable costs, let's assume
- That the full, sometimes people
- Let's just say that the full compensation for a programmer is $10,000 a month
- So if you include the cost of their salary,
- if you include the cost of their health insurance,
- you include, you know, the extra goodies that they will eat from the company kitchen,
- whatever it might be,
- so it's going to be $10,000 a month
- So my variable, my total variable costs
- are going to be $10,000 times the number of programmers
- So here I'm gonna write equals
- and I'm gonna write, it's gonna be $10,000 per programmer
- times, that little snowflake, I just pressed shift 8 to get that snowflake
- times, and I can say times whatever is in that cell
- so you see it's cell D7
- Actually, let me scroll this over so you can actually see the cells
- so actually cell D7, let me press enter
- so that cell
- is ten thousand dollars times D7
- which is this one right over here
- and I just selected that and I can press enter
- and right now, that's nothing
- Let me scroll over so you can see everything a little bit better
- Scroll a little bit to the, there you go I'm having trouble
- Ok, there you go
- Now, what are going to be my total costs?
- My total costs are my fixed costs plus my variable costs
- So that's going to be equal to
- And I'm just using my arrow keys right now
- It's going to be equal to F7, that's cell F7
- plus this one, plus my variable costs
- My total costs are my fixed costs plus my variable costs
- and so it's fifteen thousand dollars
- And actually, I can make this true for every row over here
- This is one of the really useful things about a spreadsheet
- is, I define this cell as being $10,000 times whatever this cell is
- right over here
- So what I can just do is
- I can just scroll, drag that all the way down
- And for every one of these, it's going to take $10,000
- times the cell that's essentially 3 to its left
- This will be 10,000 times D8
- This will be 10,000 times D9
- or, then it will just look at that
- So we can see right there, 10,000 times D9
- You could click on there, you can actually see what the formula is
- 10,000 times D9
- So by dragging that I was able to get the right formula all the way down
- Now the total costs for every row here is going to be
- 2 to the left, plus 1 to the left
- and so if I drag that down, it'll do that for every row over here
- So now this is 25, is the 15 plus the 10
- 105 is the 15 plus 90,000
- our total costs are fixed costs plus variable costs
- Now let's think about the average fixed costs
- and the average fixed costs, we're gonna think about it in fixed costs
- per line of code produced
- and over here line of code produced is 0, so we're gonna divide by 0 which is undefined
- So we can leave that blank, but we can fill this one in
- So our total fixed costs, this is going to be our total fixed costs
- which is cell F8, I just use the arrow keys to select F8
- divided by, our total lines of code per month
- So divided by our total lines of code per month
- and so, that gives me $3.75 in fixed costs per line of code
- and then I can scroll, I can do the same thing that I've been doing before
- I can drag this down
- and then we see what the fixed cost is at any given point
- if iItake the fixed cost $15,000 divided by the lines of code I get $1.38
- and this actually makes sense because
- the more programmers I add onto this project the more lines of code I get
- I'm using the same fixed costs
- I'm using the same project manager
- I'm using the same office space
- so the cost of that project manager and that office space
- gets spread out amongst, or, along more and more code
- So the cost, the fixed cost per line of code goes down
- as we add more and more programmers
- Now, what is the average variable cost?
- So once again, the variable cost is going to be
- whatever the variable cost is, per lines of code per month
- So when we're talking about average, we're talking about the average cost per line of code
- So this is, per line of code, per
- let me write it over here
- per line of code, and I'm gonna say, per month
- Actually I wanted that to spread out more but the way I've set it up, I'll just scroll down
- Woops! I'm even having issues here.
- Alright, well! These are all per line, average lines of code per month
- And so let's think about what happens with our variable costs
- So I'm also gonna start here because I don't wanna divide by 0
- So in this month, our total variable costs were $10,000
- And our total lines of code are going to be $4,000
- G8 divided by E8
- So, average variable cost per line of code is $2.50
- And then what happens, so let's do that for every row over here
- So when we do it for every row, something interesting happens
- Our average fixed cost went down
- Because we're taking the saame cost and spreading it out among more code
- But our average variable costs went up
- As we added more programmers,
- per line of code it actually cost us a little bit more
- on average, per line of code
- And that's actually if you look here,
- as we add the incremental lines of code we get per programmer is actually going down
- That first programmer by themselves, she can write 4,000 lines of code
- But then, that second programmer is only, you're not getting to 8,000
- You're getting to 3,000 and probably they have to co-ordinate with each other
- They have to plan a little bit more
- It's not all in one person's head
- Then, when you add the third one
- You're not even adding 3,000 lines of code, you're only adding 2,000 lines of code
- And this is actually a real phenomenon, that actually happens in companies
- The more people you add on to a project,
- obviously maybe they can do more work,
- there's going to be more co-ordination,
- there's going to be more meetings, there's going to be more interruption
- And so each person's individual productivity,
- is going to go down
- And this isn't to say that the third coder is somehow worse than the first coder
- All of their, on average,
- all of them are only going to produce 3,000 codes, 3,000 lines of code per month,
- when maybe indivually they could have each produced 4,000 lines of code
- but they have to spend some of their energies co-ordinating
- And so that's why our average variable costs, per line of code is going up
- As we add more and more people it's getting us incrementally,
- it's getting more and more expensive on average,
- to write that line of code
- And as we look at average total cost, that's going to be,
- once again, this is per line of code,
- is gonna be our total cost H8, divided by the total lines of code per month
- So, if we just hire one engineer,
- we're going to have $6.25 spent per line of code
- And that's because a lot is spent on,
- and these are, this is actually just the sum of these two right here
- And then, let me make that, set that formula for every row
- And so, we see something interesting
- When we start to hire a few engineers,
- we are able to spread out our fixed costs,
- even though our average variable costs per line of code are going up,
- our fixed costs are going down
- So, we're getting a little bit of a benefit for spreading our fixed cost per line of code
- But then it starts to get expensive again,
- because as we said,
- the more people you have working on the project,
- you're going to have to spend more time co-ordinating with each other,
- and maybe even undoing each other's work,
- or even redoing each other's work as opposed to just writing those actual software
- And now let's think about the marginal cost
- The marginal cost, the best way to think about it is,
- what is the incremental cost of that next set of line of code?
- So one way to think about it,
- so this is going to be how much more you're spending,
- divided by how much more code you're getting
- So how much more, so for example, how much more,
- And this is going to be once again per line of code
- So once again, so we're getting,
- we're spending, when we go from 0 programmers to 1 programmer,
- we're going from $15,000 of total cost to $25,000 of total cost
- So we're going from $15,000 to $25,000
- that means we're increasing our expenditure by $25,000 minus $15,000
- And so that's why I'm doing H8 minus H7
- So that's how much more we're spending in expenditures,
- and then how much more code are we getting?
- Well, we're getting 4,000 minus 0 lines of code
- And the reason why I'm doing the formula this way,
- is so that when we drag it down on all the rows,
- the formula will be right
- So, because it is relatively taking the right cells into account
- And the reason why I'm saying this it's average,
- 'cause this is saying,
- What's the incremental cost for this first 4,000 lines of code?
- And then we can go from there, maybe we can drag it down
- And now this is the incremental cost of code,
- for the next 3,000 lines of code
- And once again, it got a little bit more expensive,
- because, we're getting a little bit less efficient because we're adding more people
- And there's something very interesting that happens here,
- you might have noticed it in these numbers right here
- We actually get a negative marginal cost,
- this isn't meaning that when we add more lines of code
- Somehow we're getting money,
- it's actually saying that as we spend more money,
- we're actually killing lines of code
- Because at some point, if you have too many people on this one project team,
- they actually start killing each other's productivity
- And you can even see it right here in the numbers
- When we had 7 people we were able to write 11,400 lines of code,
- but then the 8th person, because of co-ordination,
- it's not that this 8th person is incompetent,
- it just, when you have 8 people in the team,
- everyone's productivity goes down
- So that you're only able to produce 11,200 lines of code
- And that's why you have this negative marginal cost
- Now when you get to 8 people, all of a sudden,
- by spending more dollars, you're actually destroying some of what you're actually trying to produce
- So what I wanted to do here is just to really get you behind numbers,
- and really maybe give you a little sense of how you can actually do this with a spreadsheet,
- and get you thinking a little bit about how a firm's cost structure might actually work
Be specific, and indicate a time in the video:
At 5:31, how is the moon large enough to block the sun? Isn't the sun way larger?
|
Have something that's not a question about this content? |
This discussion area is not meant for answering homework questions.
Discuss the site
For general discussions about Khan Academy, visit our Reddit discussion page.
Flag inappropriate posts
Here are posts to avoid making. If you do encounter them, flag them for attention from our Guardians.
abuse
- disrespectful or offensive
- an advertisement
not helpful
- low quality
- not about the video topic
- soliciting votes or seeking badges
- a homework question
- a duplicate answer
- repeatedly making the same post
wrong category
- a tip or feedback in Questions
- a question in Tips & Feedback
- an answer that should be its own question
about the site
Share a tip
Suggest a fix
Have something that's not a tip or feedback about this content?
This discussion area is not meant for answering homework questions.