How to create a form that performs calculation?