I have 9 different debts (5 of which are student loans) each with a different interest rate (ranging from 3.4% APR to 10.9% APR). I want to find out in which order paying them off would take the least amount of time. The amount from each loan, once paid off, will be applied to the next (or a different) debt.
+-------+-----------+-------+-----------+
| Name | Balance | APR | Minimum |
+-------+-----------+-------+-----------+
| A | 132.51 | 3.4 | 100 |
| B | 1000 | 9.15 | 100 |
| C | 2500 | 10.9 | 100 |
| D | 8283.93 | 8.99 | 270 |
| E | 6975.82 | 4.5 | 80 |
| F | 7451.52 | 6.8 | 80 |
| G | 7550.68 | 7.65 | 65 |
| H | 12845.06 | 7.65 | 105 |
| I | 15324.46 | 7.65 | 125 |
+-------+-----------+-------+-----------+
After one loan/debt is paid off, that monthly payments get carried over to the next one on the list. For example, in Month 1, I pay 100 on A (remaining balance ~ 32.51) and 100 on B (remaining balance ~900). Month 2 I pay 32.51 on A (remaining balance 0) and 177.49 (carry over from A) on B. The following month, I pay 200 on B, etc. This all boils down to the sum of the minimums (1250) being paid on I each month until it's gone.
If I pay them off in the order above, I have estimated that I will be able to pay them all off by October 2022. This was calculated using a spreadsheet and copy/pasting the same formula over and over again for each month until the debt was paid down, and then copy/pasting that for each debt. However, this assumes that the carry over is going to the next item in the list. It may be faster however if the debt from B is moved to E instead of C.
My question is this. Is there a formula/program that would allow me to input this data, and it would calculate the fastest way to eliminate all of the debt above?
NOTE: This question is not focused on minimizing "potential savings lost" (ie. paying the debt with the highest interest rate first), but rather on minimizing the time taken to pay them all down.