How to Automatically Add Conditional Days to a Contract Date in a Formula?

I’m working on a setup where I need to calculate a new date by adding either 15 or 5 days to a contract date, depending on certain conditions. I already have a field that determines the number of days to add, but I’m not sure how to use this value to calculate and display the resulting date. Any suggestions?