The following fields will need to be created:
Field1 - text box with this code to the default value:
//<code> return date('m/d/o'); //</code>This snippet will return the current date. Of course you can also use the calendar to select a specific date.
Field2 - text box with "Numeric" validation rule
Field3 - hidden field
For the next step you will have to set the Field3 value with the result of the desired calculation. To achieve this just paste the following code in the "Scripts" tab, on "Scripts called on form process":