Linear regressions with period and group fixed effects are widely used to estimate treatment effects. We show that they estimate weighted sums of the average treatment effects (ATE) in each group and period, with weights that may be negative. Due to the negative weights, the linear regression coefficient may for instance be negative while all the ATEs are positive. We propose another estimator that solves this issue. In the two applications we revisit, it is significantly different from the linear regression estimator.D g,t denotes the average treatment in group g at period t, while Y g,t (0), Y g,t (1), and Y g,t respectively denote the average potential outcomes without and with treatment and the average observed outcome in group g at period t.Throughout the paper, we maintain the following assumptions.Assumption 1 requires that no group appears or disappears over time. This assumption is often satisfied. Without it, our results still hold but the notation becomes more complicated as the denominators of some of the fractions below may then be equal to zero.Assumption 2 (Sharp design) For all (g, t) ∈ {1, ..., G} × {1, ..., T } and i ∈ {1, ..., N g,t },Assumption 2 requires that units' treatments do not vary within each (g, t) cell, a situation we refer to as a sharp design. This is for instance satisfied when the treatment is a group-level variable, for instance a county-or a state-law. This is also mechanically satisfied when N g,t = 1. In our survey in Section 6.1, we find that almost 80% of the papers using two-way fixed effects regressions and published in the AER between 2010 and 2012 consider sharp designs. We focus on sharp designs because of their prevalence, but in Section ?? of the Web Appendix, we show that all the results in Sections 3-4 below can be extended to fuzzy designs.Assumption 3 (Independent groups) The vectors (Y g,t (0), Y g,t (1), D g,t ) 1≤t≤T are mutually independent.We consider D g,t , Y g,t (0), Y g,t (1) as random variables. For instance, aggregate random shocks may affect the average potential outcomes of group g at period t. The treatment status of group g at period t may also be random. The expectations below are taken with respect to the distribution of those random variables. Assumption 3 allows for the possibility that the treatments and potential outcomes of a group may be correlated over time, but it requires that the potential outcomes and treatments of different groups be independent.