Price based on rental period

Hey guys, is there a way to change the total of a quote based on how long the rental is for?

I want to be able to set the day-rate for each product in the products view, and then be able to enter a timeframe, say a week when creating the quote. The result of this would be a function, lets say f(x), that calculates a price for the total time of the rental period.