Another one to look at is
Magento, it has some advanced product attribute features.
Is there a limited number of different lengths? If so, an alternative to multiplying the length by the cost per inch is to make each length a product attribute and create a table of length and cost data. It will be tedious inputting the data by hand, but it'll be easier and cheaper than getting someone to write a custom script for the job, though as Dazina has already said, there's probably a Zen mod available to do this sort of pricing.