Attack Speed

is applied to the base attack speed of the currently equipped weapon, or natural weapon (fists, claws, bite, etc.). bonuses and/or maluses depend on Dexterity, active spells and equipment modifiers, and stack additively. The result is capped in the [-50%, +50%] range.

The bonus determined by Dexterity is calculated as follows: 

for Human players, but can vary depending on creature type.

Mechanics
The speed of an attack mostly depends on the base speed of the currently equipped weapon, which is standardized in three different speed types: Fast, Normal and Slow. Each Speed type determines the base number of attacks per seconds (APS) the weapon can perform. The Attack Time of a weapon is the time that takes to perform a full attack, or the minimum time that needs to pass between two attacks, and is calculated as:

is a combination of and.
 * is the duration of the attack animation
 * is the extra amount of time that needs to pass to perform the next attack.

To calculate and  we need three parameters: The portion of  is calculated as follows:

is the remainder:

The last value is Attack Proc Time that determines at which instant of the attack animation damage is dealt. It is set to an arbitrary % of the animation.

Note that an attack animation can be cancelled at any moment, but there are mainly two different cases:

1. Attack cancelled before the Attack Proc Time: The damage doesn’t proc, and the creature can start another attack right away, without waiting for the Attack Animation Time and Cooldown to elapse.

2. Attack cancelled after the Attack Proc Time: The damage happened at the Attack Proc Time, and you must wait the full remainder of the Attack Animation Time and Cooldown to elapse before starting another attack.

The Attack Speed Modifier determined by dexterity, spells and equipment, is applied directly to the base APS of the currently equipped weapon: