Decoupling caps distance from the IC pins
There isn't a fixed equation that relates maximum decoupling cap distance to maximum frequency because there isn't a fixed relationship in the first place.

The problem comes down to not being able to know all the relevant parameters to decide exactly what you can get away with.  Therefore, we generally over-design and don't push things to the limit.

Decoupling caps are the first parts you should place after placing a chip.  Look at which pins each decoupling cap must connect between, and place the decoupling caps to keep the leads as short as reasonably possible.

So how far can you go?  Will a extra millimeter matter?  A extra 5 mm? One inch?  Dirty Harry had a good answer to this: Do you feel lucky?  Well, do you, punk?