Start from the monthly payment you can afford and see how much you can borrow at a given rate and term.
Most loan calculators start with the price. This one starts with the payment your budget allows, then finds the loan that payment can repay at the rate and term you enter. A longer term raises the loan you can borrow but increases interest.
A $500 monthly payment at 8% over 60 months supports a loan of about $24,659.22. A 36-month term supports about $15,955.90, and 84 months about $32,079.63.
Level monthly payments with interest at the rate divided by 12. Fees, taxes and insurance are excluded. Lenders decide what they will actually offer. Not financial advice.