# How to Calculate Remaining Hours, Percent Complete, and EAC for Tasks and Plans

## Overview

This article gives an overview on how fields such as percent complete, remaining hours, and estimated at completion (EAC) are updated and/or calculated as needed.

## Percent Complete versus Remaining Hours

One of the key drivers for these fields is whether the associated project is configured to update tasks based on percent complete or remaining hours.

When a project is set to update tasks based on **percent complete**, the remaining hours is automatically calculated based on the estimated hours multiplied by the completion percentage.

When a project is set to update tasks based on **remaining hours**, the percent complete is generally automatically calculated based on the remaining hours divided by the estimated hours. If the remaining hours exceeds the estimated hours, the percent complete is capped at 0%.

One exception to this rule is when the estimated hours are set to zero, in which case the percent complete is specified during the update process instead of remaining hours.

In addition, when changing estimated hours for a task that uses remaining hours, the difference in estimated hours (positive or otherwise) is also applied to the remaining hours if the task is not yet complete.

Furthermore, checking out a plan, making remaining hours changes on a task, and then un-doing the checkout ** does not** un-do all the remaining hours changes you made to the plan.

With regard to the percent complete or remaining hours, this is the intended behavior. The percent complete (or remaining hours) can be updated from many different spots throughout the system (TDNext/TDClient/TDMobile) and also by users that don't have the permissions to check in/check out plans. Therefore, we don't want to enforce check in / check out rules for updating the percent complete or remaining hours for a task on a plan. While this may seem like counter-intuitive behavior when working from the plan, it allows for multiple people to update a plan with their progress at the same time.

## Estimated at Completion (EAC)

For all tasks (parent or otherwise), the Estimated at Completion (EAC) is calculated using the following formula:

`Task Actual Hours + Task Remaining Hours`

For parent tasks, this means that this will roll up both the actual hours and remaining hours of its children.

## Leaf (i.e., Non-Parent) Tasks

For tasks which are not parent tasks, the calculations above apply for percent complete and remaining hours.

## Parent Tasks

### Percent Complete

The percent complete for parent tasks is calculated in several different ways depending on whether any of the parents' children have estimated hours specified.

If all child tasks are complete, the percent complete will be 100%. Otherwise, the rules below will apply.

*With Estimated Hours*

If there is at least one child task with estimated hours specified (the most common case), the parent's percent complete will use the following formula:

`Sum(For each child task: Child percent complete * Child estimated hours / Parent's total estimated hours)`

Effectively, this means that each child task's completion percentage is weighted by its estimated hours. This also means that if there is at least one child task with estimated hours specified, any child tasks that do not have estimated hours will ** not** be included in the overall completion percentage.

*Without Estimated Hours*

If, however, none of a parent's child tasks have estimated hours, the following formula is used:

`Sum(For each child task: Child percent complete * Child working days / Parent's total working days)`

Note that the parent's total working days will sum up the range of working days for each child task even if there is overlap between date ranges for the child tasks.

If there are no working days or estimated hours specified, and there is at least one incomplete child task, the percent complete for the parent task will be fixed at zero.

### Remaining Hours

Remaining hours for parent tasks are calculated using the following formula:

`Sum(For each child task: Child remaining hours)`

## Plans

### Percent Complete

Like parent tasks, the plan's overall percent complete is calculated differently depending on whether any of the tasks have estimated hours or not.

*With Estimated Hours*

When at least one leaf task has estimated hours defined, the plan's percent complete is calculated using the following formula:

`Sum(For each leaf task: Leaf percent complete * Leaf estimated hours / Total estimated hours)`

Like how the percent complete for parent tasks is calculated, if there is at least one leaf task with estimated hours, any leaf tasks that do * not* have estimated hours will be excluded from the above calculation.

*Without Estimated Hours*

If none of the plan's leaf tasks have estimated hours, the plan's percent complete is calculated using the following formula:

`Average(For each leaf task: Leaf percent complete)`

### Remaining Hours

Remaining hours for plans are calculated using the following formula:

`Sum(For each root-level task: Root remaining hours)`

### Summary Information

When viewing a list of plans (such as in the "Plans" tab in the project management console or in desktop modules), the top-level completion percentages and remaining hours are aggregated using the same basic formula but using an optimized process.

This may result in small discrepancies, most typically in rounding, between how the plan is displayed in a summary view and how it is displayed individually.