If you're seeing this message, it means we're having trouble loading external resources on our website.

Если вы используете веб-фильтр, пожалуйста, убедитесь, что домены ***.kastatic.org** и ***.kasandbox.org** разблокированы.

Основное содержание

Текущее время:0:00Общая продолжительность:17:36

what I want to do in this video is go over the math behind a mortgage behind a mortgage loan this isn't really going to be a finance video it's actually a lot more mathematical but it addresses at least in my mind one of the most basic questions that's at least been circling in my head for a long time and you know we take out these loans to buy houses let's say you take out a $200,000 loan mortgage loan it's secured by your house you're going to pay it over 30 years or you could say that's three hundred and sixty months because you normally pay the payments every month the interest normally compounds on a monthly basis and let's say you're paying 6% interest this is annual interest and they're usually compounding on a monthly basis so 6% divided by 12 you're talking about 0.5% per month per for a month now normally when you get a loan like this you're a mortgage broker or your banker will look into some type of chart or typing the numbers into some type of computer program and they'll say okay your payment is going to be your payment is going to be $1200 per month and if you pay that $1,200 per month over 360 months at the end of those 360 months you will have paid off the $200,000 plus any interest that might have accrued but this number it's it's not that easy to come along because let's just show an example of how this of how the actual mortgage works so on day 0 you have a $200,000 loan you have a 200,000 I'll just write $200,000 loan you don't pay any mortgage payments you're going to pay your first mortgage payment a month from today so this amount is going to be is going to be compounded by the 0.5% maybe I should write 0.5% and as a decimal that's 0.005 so in a month with interest this will have grown to 200,000 times one plus point zero zero five so one point zero zero five then you're going to pay the $1200 so there's going to be minus twelve hundred or maybe I should write one point two K but I'm just really just showing you the idea and then for the next month whatever is left over is going to be compounded again by the point five percent 0.005 and then the next month you're going to come back and you're going to pay this twelve hundred dollars again minus twelve hundred dollars and this is going to happen 360 times so you're going to keep doing this and you can imagine if you're actually trying to solve for this number at the end of it you're going to have this huge expression that's going to have you know 360 parentheses over here and at the end it's all going to be equal to zero because after you've paid your final payment you're done paying off the house but in general how did they figure out how did they figure out this payment this payment let's call that P is there any mathematical way to figure it out and to do that let's get a little bit more abstract let's say that L is equal to the loan amount the loan amount let's say that I is equal to the monthly interest monthly interest let's say n is equal to the number of months number of months that we're dealing with and then we're going to set P we're going to get set P is equal to your monthly payment your monthly mortgage payment some of which is interest some of which is principal but it's the same amount you're going to pay every month to pay down that loan plus interest so this is your monthly payment so this same expression I just wrote up there if I wrote it in abstract terms you start off with a loan amount L after one month it compounds as one plus I so you multiply it times one plus I I in this situation was 0.005 then you pay a monthly payment of eeee so - P so that's at the end of one month now you have some amounts to the leftover of your loan that will now compound over the next month then you're going to pay another payment P and then this process is going to repeat 300 or n times because I'm staying abstract so you have this is going to repeat you're going to have I guess the best way I can express that is that you're going to have n parenthesis parenthesis and after you've done this n times that is all going to be equal to 0 so my question you know the one that I'm essentially setting up in this video is how do we solve for P you know if we know the loan amount if we know the monthly interest rate if we know the number of months how do you solve for P it doesn't look like this is really an easy algebraic equation to solve so let's see if we can make a little headway let's start with if we let's see if we can rearrange this in a general way so let's start with an example of n being equal to 1 if n is equal to 1 then our situation looks like this you take out your loan you compound it for 1 month 1 plus I and then you pay your monthly payment now this was a mortgage that gets paid off in one month so after that one payment this will you are now done with your loan you have nothing left over now if we solve for P you can out swap the sides you get P is equal to L times 1 plus I or if you divide both sides by 1 plus I you get P over 1 plus I is equal to L you might say hey you already solved for P why are you doing this and I'm doing this because I want to show you a pattern that will emerge let's see what happens when n is equal to 2 n is equal to 2 well then you start with your loan amount it compounds for one month you take your payment then there's some amount left over that will compound for one month then you make your second payment now this mortgage only needs two payments so now you are done you have no loan leftover you've paid all the principal and interest now let's solve for P so I'm going to color the peas I'm going to make this P pink so let's add P to both sides and swap sides so this green P will be equal to all of this business over here is equal to is equal to L times 1 plus I minus that pink P they're the same P I just want to show you what's happening algebraically - that pink P times 1 plus I now if you divide both sides by 1 plus I you get P over 1 plus I is equal to L times 1 plus I minus that pink P now let's add that pink P to both sides of this equation you get you get the pink P Plus this P plus P over 1 plus I is equal to L times 1 plus I now divide both sides by 1 plus I you get the pink P over 1 plus I plus the green P they're the same P the green P times it already is being divided by 1 plus I going to divide it by again by 1 plus I so it's going to be divided by 1 plus I squared is equal to the loan something interesting is emerging the loan you might want to watch the videos on present value in this situation you take your payment you discount it by your monthly interest rate you get the loan amount here you take each of your payment's you discount it you divide it by the essentially one plus your monthly interest rate ^ the number of months and you see you're essentially taking the present value of your payments and once again you get your loan amount and you're going to see you might want to verify this for yourself if you want a little bit of algebra practice if you do this with n is equal to 3 I'm not going to do it just for the sake of time if you do N is equal to 3 you're going to get that the loan is equal to P over 1 I plus P over 1 plus I squared plus P over 1 plus I to the third you know if you have some time I encourage you to prove this for yourself just using the exact same process that we did here you're going to see it's going to get a little bit hairy and a little bit there's going to be a lot of manipulating things but it won't take you too long but in general hopefully I've shown to you that we can write the loan amount as the present value of all of the payments so we could say in general the loan amount if we now generalize it to N instead of an N equals the number we could say that it's equal to and I'll just I'll actually take the P out of the equation so it's equal to P times 1 plus 1 over 1 plus I plus 1 over 1 plus I squared plus and you just keep doing this n times plus 1 over 1 plus I to the N now you might recognize this this right here is a geometric series this right here is a geometric series and there's ways to figure out the sums of geometric series for arbitrary ends this is a geometric series as I promised at the beginning of the video this would be an application of a geometric series it's equal to it's equal to the sum of 1 over 1 plus I to the allow use some other letter here to the J from J is equal to 1 this is to the 1 power you could view this as to the first power to J is equal to n that's exactly what that sum is so if let's see if there's any simple way to solve for that something you don't want to do this 360 times you could you'll get a number and then you could divide L by that number and you would have solved for P but there's got to be a simpler way to do that so let's see if we can if we can simplify this so let's just to make the math easier let me make a definition let's say that R is equal to 1 over 1 plus and let me call this wholesome right here let me call that s this some right here is equal to s then if we say R is equal to each of these terms then s is going to be equal to this is going to be R to the first power or I'll write R to the first this is going to be R squared because if you square the numerator you just get 1 again so this is plus R squared plus R to the third plus all the way this is R to the n plus R to the N and now I'll show you a little trick I always forget the formula so this is a good way to figure out the sum of a geometric series actually this could be used to find the sum of an infinite geometric series if you like but we're dealing with a finite one let's multiply R let's multiply s times R so R times s is going to be equal to what if you multiply each of these terms by r you multiply R to the first times R you get R squared you multiply R squared times R you get R to the third and then you keep doing that all the way you multiply you multiply R let's see there's an R to the N minus 1 here you multiply that times R you get R to the N and then you multiply R to the N times R you get plus R to the n plus 1 all this is right here is all of these terms multiplied by R and I just put them under the same exponent now what you can do is you could subtract this green line from this purple line so if we were to say s minus s minus r s what do we get I'm just subtracting this line from that line well you get R 1 minus 0 so you get R 1 or R to the first power minus nothing there but then you have R squared minus R squared cancel out our third minus our 3rd cancel out they all cancel out all the way up to R to the N minus R to the N cast cancel out but then you're left with this last term here and this is why it's a neat trick so you're left with minus R to the n plus 1 now factor out an S you get s times 1 minus R all I did is I factored out the s is equal to R to the first power minus R to the n plus one and now if you divide both sides by 1 minus R you get your sum your sum is equal to R I don't have to write r to the first you just write r minus r to the n plus 1 over 1 minus r that's what our sum is equal to where we defined our r in this way so now we can rewrite this whole crazy formula we can say that our loan our loan amount is equal to our monthly payment times this thing I'll write it in green times R minus R to the n plus 1 all of that over 1 minus R now if we're trying to solve for P you multiply both sides by the inverse of this and you get you would get P is equal to your loan amount times the inverse of that I'll do it in pink because it's the inverse 1 minus r over r minus r to the n plus 1 where r is this thing right there and we are done this is how you can actually solve for your actual mortgage payment let's actually apply it so let's say that your loan let's say your loan is equal to $200,000 let's say that your interest rate is equal to 6% annually which is 0.5% monthly which is the same thing as 0.005 this is monthly interest rate and let's say it's a 30-year loan so n is going to be equal to 360 months let's figure out what we get so the first thing we want to do is we want to figure out what our R value is so let's figure out our R value so R is 1 over 1 plus I so let's take so it's 1 divided by 1 plus I so plus point zero zero five that's what our monthly interest is half a percent one and close parentheses and that is equal to so 0.995 that's what our R is equal to let me write that down 0.995 now this calculator doesn't store variables so I'll just write that down here so our R is equal to a point let me write a zero in front of it zero 0.995 we just used that right there I'm losing a little bit of precision but I think it'll be okay the main thing is I want to give you the idea here so what is our payment amount let's multiply our loan amount that's two hundred thousand dollars two hundred thousand two three so that is two hundred thousand times we have one minus R so one minus point nine nine five one minus point nine nine five divided by divided by r which is point nine nine five minus 0.995 to thee now n is 360 months that's going to be 360 plus one to the 360 one power so something I could definitely not do in my head and then I close the parentheses and my final answer is roughly twelve hundred dollars if actually you do it with the full precision you get a little bit lower than that but this is going to be roughly twelve hundred dollars so just like that we were able to figure out our actual mortgage payment so P is equal to twelve hundred dollars so that was some reasonably fancy math to figure out something that most people deal with every day but now you know the actual math behind it you don't have to play with some table or spreadsheet to kind of experimentally get the number