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...