When the new loan beats what you've got on total cost or monthly cash flow, after every payout and fee. Start from payout letters, not the balances in your accounts, which miss accrued interest and break costs.
Worked example: two loans with 24 months left, at $2,500 and $1,500 a month. Keeping both costs 24 × $4,000 = $96,000. Refinance over 24 months at $3,700 a month plus $2,000 up front and you pay $90,800, saving $5,200. Refinance over 36 months at $2,700 a month plus $2,000 and you pay $99,200, which is $3,200 more for a repayment $1,300 a month lower.
Both can be right. A construction company we worked with was carrying three short-term loans with heavy weekly repayments. One $220,000 facility on the directors' home turned them into a single monthly repayment and released $35,000 for an office refurbishment. Leave good debt alone: a cheap equipment loan doesn't need refinancing just to tidy the list.