In this study the amount of genotype by environment interaction (G×E) for length of productive life of Swedish Red and White dairy cattle was studied. The environmental variables used were the herd-year averages of number of first parity cows, peak yield, protein yield, and productive life. Data were analysed using multi-trait models (using low and high quartile herds) and reaction norm models (using the whole continuous scale). Considerable G×E was found for the trait productive life between environments (herds) with short or long average productive life, and a genetic correlation of 0.74 was found. For productive life in relation to herd size, G×E was negligible, and the genetic correlation was 0.95. For productive life in relation to herd-year average of peak yield or protein yield some G×E was indicated by the reaction norm model, especially between extreme environments. The G×E between herds with short or long average productive life should be studied further and might need to be considered in breeding programmes for dairy cattle.