Somebody out there probably has a much more efficient way to do this, but here's how i did it.

Simple interest:

I = Prt (principle * rate * time) The rate is per annum (per year). The time is in months - how many months out of the year there continues to be a balance (so, if it take 7 months, then t would be 7/12). And make sure your rate of 19% is in decimal form (.19).

To figure out interest you'd accumulate in 1 month,

I = 500(.19)(1/12) = 7.916 (7.92)

To figure out how much interest you'd accumulate in 1 year,

I = 500(.19)(12/12) = 95.00

After 1 year, accumulated interest would be 95.00. In a year, you would need to have paid 595.00.

If you paid $40 a month, by the end of one year, you would've paid $480. (40)(12) = 480. Not enough.

You'd need more months just to surpass the principle + first year's interest. But during those additional months, more interest accumulates. Let's try 15 months. So, the interest would be:

I = 500(.19)(15/12) = 118.75. So, the total after 15 months would be 618.75.

I + P is 118.75 + 500 = 618.75.

Paying $40 a month for those 15 months gives you 40(15), which is 600. Still short. Looks like it will take one more month.

I = 500(.19)(16/12) = 126.67

I + P is 126.67 + 500 = 626.67

Paying $40 a month for those 16 months gives you 40(16) = 640. 16 months paying 40/month.