Actual duration = actual finish - actual start.
Or if the task is not finished, then it is based on the date the task is
updated through. In that case there are some different settings which can
affect it.
Here is what the Project Help file says about it:
Description The Actual Duration field shows the span of actual working
time for a task so far, based on the scheduled duration and current
remaining work or percent complete.
How Calculated If you type a value in the % Complete field, Microsoft
Project calculates actual duration as follows:
Actual Duration = Duration * Percent Complete
If you type a value in the Actual Duration field, Microsoft Project
calculates the Remaining Duration as follows:
Remaining Duration = Duration - Actual Duration
If you enter an actual duration greater than the scheduled duration,
Microsoft Project changes scheduled duration to match the new actual
duration, sets the remaining duration to zero, and sets the percent complete
to 100.
Best Uses Add the Actual Duration field to a task sheet when you want to
view, filter, or edit actual duration for tasks. If you edit this field,
however, the remaining duration and percent complete fields is recalculated.
Example The scheduled duration for the "Conduct client meetings" task is 3
days. If the task is 33 percent complete, the actual duration is 1 day.
Remarks Because entering a value in the Actual Duration, Remaining
Duration, or % Complete field automatically recalculates the other fields,
you should enter a value in only one of these fields for a task.
Editing remaining duration affects total scheduled duration rather than
actual duration.
When you enter percent complete or total actual work, Microsoft Project
reschedules remaining work around the status date by default. If you prefer,
you can leave these tracking fields in the project as originally scheduled,
even if completed work is shown in the future or remaining work is shown in
the past. On the Tools menu, click Options. On the Calculation tab, clear
the Move end of completed parts after status date back to status date and
Move start of remaining parts before status date forward to status date
check boxes.
To set the status date to a date other than today's date, click Project
Information on the Project menu, and then enter the date in the Status date
box.