Context. The Kepler space telescope monitors more than 160 000 stars with an unprecedented precision providing the opportunity to study the rotation of thousands of stars. Aims. We present rotation periods for thousands of active stars in the Kepler field derived from Q3 data. In most cases a second period close to the rotation period was detected that we interpreted as surface differential rotation (DR). We show how the absolute and relative shear (ΔΩ and α = ΔΩ/Ω, respectively) correlate with rotation period and effective temperature. Methods. Active stars were selected from the whole sample using the range of the variability amplitude. To detect different periods in the light curves we used the Lomb-Scargle periodogram in a pre-whitening approach to achieve parameters for a global sine fit. The most dominant periods from the fit were associated to different surface rotation periods. Our purely mathematical approach is capable of detecting different periods but cannot distinguish between the physical origins of periodicity. We ascribe the existence of different periods to DR, but spot evolution could also play a role. Because of the large number of stars the period errors are estimated statistically. We thus cannot exclude the existence of false positives among our periods.Results. In our sample of 40 661 active stars we found 24 124 rotation periods P 1 between 0.5 and 45 days, with a mean of P 1 = 16.3 days. The distribution of stars with 0.5 < B − V < 1.0 and ages derived from angular momentum evolution that are younger than 300 Myr is consistent with a constant star-formation rate; the detection among older stars is incomplete probably because of our active sample selection. A second period P 2 within ±30% of the rotation period P 1 was found in 18 616 stars (77.2%). Attributing these two periods to DR we found that for active stars other than the Sun the relative shear α increases with rotation period, and slightly decreases with effective temperature. The absolute shear ΔΩ slightly increases from ΔΩ = 0.079 rad d −1 at T eff = 3500 K to ΔΩ = 0.096 rad d −1 at T eff = 6000 K. Above 6000 K, ΔΩ shows much larger scatter. The dependence of ΔΩ on rotation period is weak over a large period range. Conclusions. Latitudinal differential rotation measured for the first time in more than 18 000 stars provides a comprehensive picture of stellar surface shear. This picture is consistent with major predictions from mean-field theory, and seems to support these models. To what extent our observations are prone to false positives and selection bias has not been fully explored, and needs to be addressed using other data, including the full Kepler time coverage.