Area and price calculator on site

I need to put a box/calulator on my site which calculates the prices of certain products depending on the requirements of the visitors which they’d be able to select from the table. How to design that?
Example: Visitors enter the measurements of their windows and select the kind of material they want. The area is calculated with the help of measurement entered by the visitor and then multiplied by the respective rates of the selected products.

It depends on what you prefer. You could do it client side (Javascript) or server side (PHP, ASP, Coldfusion etc). Depending on that you should ask the question in the appropriate forum