Hit delay

Hit delay is the time between performing an attack (the animation starting) and the hit splat showing up (the attack dealing damage). Hit delay is measured in game ticks (one game tick is 0.6 seconds long).

Melee
When attacking using a melee weapon, the hit delay always seems to be 1 tick.

Ranged and Magic
When attacking using a ranged or magic weapon the hit delay seems to depend on the distance between you are your target. The distance is measured in squares (is easily calculated by determining the amount of steps your character has to walk to reach the target's square). The relation between distance and hit delay is shown in the following table:

Formula
From the table, the following formula can be derived: Hit delay = 1 + floor((Distance + 9) / 6) It's unknown if the formula stays correct for distances above 10. (Although, this can probably be tested on some NPC's in the fight caves which seemingly have a greater attack range than 10 squares?)