Sample Code:
<apex:page>
<apex:outputText>
{! EndDateVariable – StartDateVariable}
<apex:outputText>
</apex:page>
Instead of creating formula fields, we can just subtract it in the Visualforce page.
Cheers!!!