This study uses a new paradigm to calculate the min imum and the optimum number of involuntary psychi atric beds at a state hospital in Maine with 5538 admissions over a 7-year period. The method measures quality of care (Q) based upon the accuracy of predic tion of length-of-stay for the hospital, and of commu nity length-of-stay for the community, each corrected for the severity of illness of the average patient. When Q in the hospital equals Q in the community, there is no net movement of patients from one phase of care to the other, analogous to a zero electromotive force, and the census at that point is the minimum number of beds (22 beds/100,000 population). When patients in the commu nity were least ill, relative to the hospital then hospital bed census is at its optimum (31 beds/100,000) given cur rent resources and technology. In studying specific di agnosis groups with the same methodology the authors found that patients with schizophrenia having the ben efit of clozapine for most of the study period had a Q av eraged over 7 years that was nearly equal in both hospital and community settings. This explains the perception that tertiary psychiatric hospitals comprised mostly of patients with schizophrenia can downsize significantly. However, affective disorders and "borderline" person ality disorders clearly benefit from structured hospital care with specialized experienced staff. We make argu ments for the role of the state hospital as a homeostat for the mental health care delivery system.