Individual differences in cognitive function have been shown to correlate with brain-wide functional connectivity, suggesting a common foundation relating connectivity to cognitive function across healthy populations. However, it remains unknown whether this relationship is preserved in cognitive deficits seen in a range of psychiatric disorders. Using machine learning methods, we built a prediction model of working memory function from whole-brain functional connectivity among a healthy population (N = 17, age 19-24 years). We applied this normative model to a series of independently collected resting state functional connectivity datasets (N = 969), involving multiple psychiatric diagnoses, sites, ages (18-65 years), and ethnicities. We found that predicted working memory ability was correlated with actually measured working memory performance in both schizophrenia patients (partial correlation, ρ = 0.25, P = 0.033, N = 58) and a healthy population (partial correlation, ρ = 0.11, P = 0.0072, N = 495). Moreover, the model predicted diagnosis-specific severity of working memory impairments in schizophrenia (N = 58, with 60 controls), major depressive disorder (N = 77, with 63 controls), obsessive-compulsive disorder (N = 46, with 51 controls), and autism spectrum disorder (N = 69, with 71 controls) with effect sizes g = -0.68, -0.29, -0.20, and 0.09, respectively. According to the model, each diagnosis's working memory impairment resulted from the accumulation of distinct functional connectivity differences that characterizes each diagnosis, including both diagnosis-specific and diagnosis-invariant functional connectivity differences. Severe working memory impairment in schizophrenia was related not only with fronto-parietal, but also widespread network changes. Autism spectrum disorder showed greater negative connectivity that related to improved working memory function, suggesting that some non-normative functional connections can be behaviorally advantageous. Our results suggest that the relationship between brain connectivity and working memory function in healthy populations can be generalized across multiple psychiatric diagnoses. This approach may shed new light on behavioral variances in psychiatric disease and suggests that whole-brain functional connectivity can provide an individual quantitative behavioral profile in a range of psychiatric disorders.