In this paper we analyze class size effects in the case of primary schools in Poland. We use two empirical strategies to avoid endogeneity bias. First, we use average class size in a grade as an instrumental variable for actual class size. This allows us to control for within school selection of pupils with different abilities to classes of different sizes. Additionally, we estimate fixed effects for schools to control for differences between them. Second, we exploit the fact that there is an informal maximum class size rule. We estimate class size effect only for those enrollment levels where some schools decide to add a new class and thus dramatically lower class sizes. For such enrollment levels variance of class size is mainly exogenous and we argue that this allows to estimate quasi-experimental class size effects. In this case we again use average class size as an instrument with enrollment as a key control variable. Using both strategies we obtain similar findings. We found that the positive effects observed with OLS regression disappear when we use instrumental variables. If we avoid endogeneity bias, then class size negatively affects student achievement. However, this effect is rather small. We discuss methodology, possible bias of results and the importance of our findings to current policy issues in Poland.