The cortex represents information across widely varying timescales1–5. For instance, sensory cortex encodes stimuli that fluctuate over few tens of milliseconds6,7, whereas in association cortex behavioral choices can require the maintenance of information over seconds8,9. However, it remains poorly understood if diverse timescales result mostly from features intrinsic to individual neurons or from neuronal population activity. This question is unanswered because the timescales of coding in populations of neurons have not been studied extensively, and population codes have not been compared systematically across cortical regions. Here we discovered that population codes can be essential to achieve long coding timescales. Furthermore, we found that the properties of population codes differ between sensory and association cortices. We compared coding for sensory stimuli and behavioral choices in auditory cortex (AC) and posterior parietal cortex (PPC) as mice performed a sound localization task. Auditory stimulus information was stronger in AC than in PPC, and both regions contained choice information. Although AC and PPC coded information by tiling in time neurons that were transiently informative for ~200 milliseconds, the areas had major differences in functional coupling between neurons, measured as activity correlations that could not be explained by task events. Coupling among PPC neurons was strong and extended over long time lags, whereas coupling among AC neurons was weak and short-lived. Stronger coupling in PPC led to a population code with long timescales and a representation of choice that remained consistent for approximately one second. In contrast, AC had a code with rapid fluctuations in stimulus and choice information over hundreds of milliseconds. Our results reveal that population codes differ across cortex and that coupling is a variable property of cortical populations that affects the timescale of information coding and the accuracy of behavior