Age Calculated Date when end date is empty

I am looking to create a calculated age field (integer).  I am new to Sugar so I don't know how to craft the formula.  It would look at two date fields (start date field and an end date field) and use today's date if necessary.  I would like the age field to work as follows:

If start date field is empty then age should be empty

Else If end date is empty then today's date - start date

Else end date - start date