The way task duration is calculated depends on whether the project includes a schedule template or not.
Duration in projects with schedule template If the project includes a project schedule, the task duration is calculated depending on several factors. Familiarize yourselves with all the scenarios before setting up your project schedule.