**#1**

* Edited by Peziv at 8-15-2014 10:01 PM *

Yes I know most of you already know it but there are still a lot of people who ask this question every day.

Attack speed = A/(1+B)/((1+C)^D)/(1+E)

Attack speed is then rounded up to the nearest 200ms

Where

A = Base attack speed expressed in seconds

B = Attack speed boost from berserk expressed in decimals

C = Attack speed boost celebrate expressed in decimals

D = Number of buffs

E = Attack speed boost from frenzy expressed in decimals

E.g. Grim Reaper with 5/5 zerk (30% buff) being double buffed by a PD at 7/9 (40% buff) and frenzy level 5 (60% buff)

= 0.75/1.3/(1.4^2)/1.6

= 0.184

= 184ms theoretical speed

= 200ms actual speed

**How does the above formula work? Why isn't, for instance, a 20% speed buff simply (1-0.2)*1000?**

First you must understand what the displayed attack speed actually means. If a hero has an attack speed of 1000, it means he does 1 attack in 1000 milliseconds (i.e. 1 second). If a hero has an attack speed of 800 it means he does __1__ attack in 800ms (i.e. 0.8 seconds)

An increase in attack speed increases the **number of attacks** per second. This is where people get confused. Increasing the number of attacks per second is slightly different from decreasing the time taken to do 1 attack.

So a 20% increase in attack speed means he does 1.2 attacks in one second. This is different to him (or her) doing 1 attack in 80% of the time he normally would do it in. In other words, it doesn't mean he does 1 attack in 0.8 [(1-0.2)*1] seconds. If this did happen, the speed buff would actually have been 25% (1000/800=1.25).

In other words:

Attack : Time (s)

1.2 : 1

To express the rate in terms of how long it takes to do 1 attack, you simply divide each side of the equation by 1.2. Therefore:

Attack : Time (s)

1.2/1.2 : 1/1.2

= 1 : 0.833

i.e. He does 1 attack in 0.833 seconds which gets rounded back up to 1s (1000ms).

This is just for 1 attack speed buff. If now you wanted to factor in another buff from say frenzy, then you simply apply the same logic to the new attack speed above (i.e. 833ms). Say you have frenzy at level 5, giving you a 60% increase in attack speed, you'd do the following:

Attack: Time (s)

1.6 : 0.833

So the new attack speed is 1.6 attacks in 0.833 milliseconds. However we want to see what the attack speed is expressed as the time taken for 1 attack. To do this, just divide both sides by 1.6 this time.

Attack: Time (s)

1.6/1.6 : 0.833/1.6

= 1: 0.521

Therefore the new theoretical attack speed is 521ms which gets rounded to 600ms. You can keep doing this for any additional speed buffs.

You don't need to do ratios everytime once you understand the concept. Attack speed is always expressed as 1 attack per how many ever seconds so you just divide the given speed by 1 + the buff (in decimals). In other words for the above example it would be:

attack speed = 1/1.2/1.6

= 0.521 or 521ms

**Why did you express the buff from celebrate as "to the power of" (i.e. ^)?**

Because dividing a fraction by a whole number is the same as multiplying the denominator (bottom number) by that number and leaving the numerator (top number) untouched. For example:

1/5 ÷ 5 = 1/(5x5) or 1/5^2

TL;DR

Plug your speed buffs into the formula above to get the new attack speed.