How to set calculation inside of the form