I'd like to know the formula for calculating how long it will take me to pay off a loan.

For example, if I took a 30yr fixed loan for $74,000 with a monthly payment of $580 at 4% interest, how many months would it take me to pay it off if I was also sending in an extra $500 a month to the principal? I'm assuming the formula will also take into consideration that some of the monthly payment goes to the monthly interest payment.


If you can explain/make it simple I'd appreciate it. I want to see what the difference is for every extra $100 I send in.