I have written a NEW VERSION that goes the other way; you give the upfront costs and it finds the APR.