We evaluate the viscous damping of anisotropic flow in heavy-ion collisions for arbitrary temperature-dependent shear and bulk viscosities. We show that the damping is solely determined by effective shear and bulk viscosities, which are weighted averages over the temperature. We determine the relevant weights for nucleus-nucleus collisions at $sqrt{s_{rm NN}}=5.02$ TeV and 200 GeV, corresponding to the maximum LHC and RHIC energies, by running ideal and viscous hydrodynamic simulations. The effective shear viscosity is driven by temperatures below $210$ MeV at RHIC, and below $280$ MeV at the LHC, with the largest contributions coming from the lowest temperatures, just above freeze-out. The effective bulk viscosity is driven by somewhat higher temperatures, corresponding to earlier stages of the collision. We show that at a fixed collision energy, the effective viscosity is independent of centrality and system size, to the same extent as the mean transverse momentum of outgoing hadrons. The variation of viscous damping is determined by Reynolds number scaling.