Granger causality is a fundamental technique for causal inference in time\nseries data, commonly used in the social and biological sciences. Typical\noperationalizations of Granger causality make a strong assumption that every\ntime point of the effect time series is influenced by a combination of other\ntime series with a fixed time delay. However, the assumption of the fixed time\ndelay does not hold in many applications, such as collective behavior,\nfinancial markets, and many natural phenomena. To address this issue, we\ndevelop variable-lag Granger causality, a generalization of Granger causality\nthat relaxes the assumption of the fixed time delay and allows causes to\ninfluence effects with arbitrary time delays. In addition, we propose a method\nfor inferring variable-lag Granger causality relations. We demonstrate our\napproach on an application for studying coordinated collective behavior and\nshow that it performs better than several existing methods in both simulated\nand real-world datasets. Our approach can be applied in any domain of time\nseries analysis.\n