Need help with setting up the calculation

Hi,
a client of mine is renting bikes and has different prices depending on duration of the rent, something like this:
1-3 days:100 €
4-7 days:90 €
8-14 days:80 €

So if visitor selects rent duration of 4 days, calculation filed should multiply 4 by 90, if duration is 9 days then 9 should be multiplayed by 80 and so on.

Can claculation field accept formulas? And if it can what is the code for this specific example?

Thanks in advanced

Replies are visible only to logged in members with an active subscription.