calculating a midpoint date

calculating a midpoint date

Is there a way to calculate and store a date that is midway between two other dates? 

This is how I would expect it to be calculated, though I'm not sure how to code it:

MidpointDate = StartDate + ( (EndDate - StartDate)/2 )

I want this field to be calculated when the StartDate and EndDate have been entered and then to have it stored within the same form. I also plan to create an email notification triggered by the calculated MidpointDate.