Every unit has a base attack time (BAT), which refers to the default interval between attacks for an unbuffed unit with 0 agility and no attack speed bonus. For example, a melee lane creep has a BAT of 1.00 seconds, and thus attacks once every second by default. Similarly, if a hero with 1.7 BAT had 0 agility and no bonus attack speed, they would attack once every 1.70 seconds. While nearly every unit can have their attack speed modified, only a few heroes can actively change their BAT.
Every hero has a BAT of 1.7 except for the following:
The reciprocal of base attack time is base attack rate. For most heroes, this is 1 / 1.7 = 0.588 attacks per second. Attack speed is expressed in percent of base attack speed. The base is therefore expressed as 100. Each point of increased attack speed (IAS) adds 1 to that, giving 1% of base attack speed. Each point of agility increases IAS by 1. IAS is also modifiable by items, abilities, talents, buffs, and debuffs. Attack speed works together with BAT to determine how often a unit can attack. Attack speed has a minimum cap of 20 and a maximum cap of 700.
Note: When mousing over attack damage in the HUD, the first field shows the attack speed and the time per attack in parenthesis. The attack speed field is defaulted to 100 and adds the IAS afterward, leading to a lower boundary of 20 and an upper boundary of 700. Even though the display may show a unit to "exceed" these boundaries, the actual attack speed used for calculations will still obey the caps of 20 and 700. This can be easily verified by observing that the "time between attacks" display does not change even when pushing well past "700 attack speed".
Note2: Units that do not have 1.7 BAT will display their attack speed in the in-game HUD as if they had 1.7 BAT. For example, a unit with 0.85 BAT and no bonus attack speed (100 attack speed) will display itself as having 200 attack speed, because 0.85 seconds is how long a unit with 1.70 BAT and 200 attack speed would take in between attacks. This strange quirk makes it harder to figure out if a hero without 1.7 BAT is nearing the attack speed cap, but it does allow players to compare this uniform "attack speed metric" across all heroes more easily (only their base attack time though, as any bonuses are not expressed in this "attack speed metric", but just added on top).
Attack Speed Formula
A units attack speed and attack rate are defined as follows:
Where AsBonus and AsSlow are the additive and subtractive attack speed from items, buffs, and debuffs. AsTotal is the total attack speed, AsBase is the base attack speed, and ARate being the amount of attacks per second. The total attack speed value has a lower limit of 20 and an upper limit of 700.
For example, a level 1 Axe with no items has 1.7 BAT, 100 base attack speed and 20 agility.
Attacks per second = (AsBase + Agility + AsBonus - AsSlow) / (100 × BAT)
Attacks per second = (100 + 20 + 0 - 0) / (100*1.7)
Attacks per second = 120 / 170
Attacks per second = ~0.706
>> Axe attacks about 0.706 times per second.
Attack time = 1 / 0.706
Attack time = ~1.417
>> Axe takes about 1.417 seconds between attacks.
Here are some attack speed benchmarks and their effect on attacks per second:
20 attack speed, a unit with 20 AS will take 5 times their BAT to attack (1/5x normal speed) (lower cap)
25 attack speed, a unit with 25 AS will take 4 times their BAT to attack (1/4x normal speed)
33 attack speed, a unit with 33 AS will take 3 times their BAT to attack (1/3x normal speed)
50 attack speed, a unit with 50 AS will take 2 times their BAT to attack (1/2x normal speed)
100 attack speed, a unit with 100 AS will take 1 time their BAT to attack (1x normal speed)
200 attack speed, a unit with 200 AS will take 1/2 times their BAT to attack (2x normal speed)
300 attack speed, a unit with 300 AS will take 1/3 times their BAT to attack (3x normal speed)
400 attack speed, a unit with 400 AS will take 1/4 times their BAT to attack (4x normal speed)
500 attack speed, a unit with 500 AS will take 1/5 times their BAT to attack (5x normal speed)
600 attack speed, a unit with 600 AS will take 1/6 times their BAT to attack (6x normal speed)
700 attack speed, a unit with 700 AS will take 1/7 times their BAT to attack (7x normal speed) (upper cap)
Talents
The following heroes have a talent that grants them attack speed.
Bonus
Level 10
Level 15
Level 20
Level 25
Left
Right
Left
Right
Left
Right
Left
Right
Attack Speed
+15
+20
+20
+25
+25
+25
+30
+80
+30
+35
+90
+225
+100
Attack Speed Granting Items
Error: No field named "bonus_attack_speed" found for any of the specified database tables.
Attack Speed Bonus: Lua error in Module:Show at line 70: attempt to index field '?' (a nil value). Radius: Lua error in Module:Show at line 70: attempt to index field '?' (a nil value). Aura, affecting allies within range.
Attack Speed Bonus: 100 Duration: 6 When it is cast on an enemy. Affects self. Only grants attack speed against the targeted enemy. Bonus is lost after 5 attacks or within 6 seconds, whichever is shorter.
Attack Speed Bonus: 10/22/34/46/58/70/82/94 ( ) ( 40/52/64/76/88/100/112/124 Lua error: Error: No field named "value2_aghs_tal" found for any of the specified database tables..) Duration: 9 Affects targeted ally. Based on level of Wex.
Attack Speed Bonus per Stack: 8/16/24/32 ( 18/26/34/42) Max Stacks: 7 Duration: 18 Affects self. Gains a stack on each spell cast. 7 stacks grant 56/112/168/224 ( 126/182/238/294) attack speed.
Attack Speed Bonus per Stack: 15/20/25/30 ( 20/25/30/35) Max Stacks: 12 Affects self. Gains a stack on each attack on the same target. All stacks are lost upon changing target. 12 stacks grant 180/240/300/360 ( 240/300/360/420) attack speed.
Attack Speed Bonus: Lua error in Module:Show at line 70: attempt to index field '?' (a nil value). Duration: Lua error in Module:Show at line 70: attempt to index field '?' (a nil value). Affects self. Bonus is lost after Lua error in Module:Show at line 70: attempt to index field '?' (a nil value). (Lua error in Module:Show at line 70: attempt to index field '?' (a nil value).) attacks or within Lua error in Module:Show at line 70: attempt to index field '?' (a nil value). seconds, whichever is shorter.
Attack Speed Bonus: 600 Duration: 0.70 Affects self. Only grants attack speed against the targeted enemy. The buff is not lost upon switching target, so it continues to give attack speed upon switching back to it.