We prove the effective version of Birkhoff’s ergodic theorem for Martin-Löf random points and effectively open sets, improving the results previously obtained in this direction (in particular those of V. Vyugin, Nandakumar and Hoyrup, Rojas). The proof consists of two steps. First, we prove a generalization of Kučera’s theorem, which is a particular case of effective ergodic theorem: a trajecto...