Animals must learn to predict constantly varying threats in the environment to survive by enacting defensive behaviors. Dopamine is involved in the prediction of rewards, encoding a reward prediction error in a similar manner to temporal difference learning algorithm. However, the corresponding molecular and computational form of threat prediction errors is not as well-characterized, although norepinephrine and other neuromodulators and neuropeptides participate in fear learning. Here, we utilized fluorescent norepinephrine recordings over the course of fear learning in concert with reinforcement learning modeling to identify its role in the prediction of threat. By varying timing and sensory uncertainty in the formation of threat associations, we were able to define a precise computational role for norepinephrine in this process. Norepinephrine release approximates the strength of fear associations, and its temporal dynamics are compatible with a prediction error signal. Intriguingly, the release of norepinephrine is influenced by time and sensory feedback, serving as an antithesis of the classical reward prediction error role of dopamine. Thus, these results directly demonstrate a combined cognitive and affective role of norepinephrine in the prediction of threat, with implications for neuropsychiatric disorders such as anxiety and PTSD.