More than 110,000 people are in detention in the UK on any given day, figures from a snapshot survey suggest.
The "staggering" number includes those held in prisons, immigration centres, secure children's accommodation and psychiatric hospitals.
Researchers said the true total may be higher as not all government and other official agencies provided complete and comparable data, while the analysis does not cover police custody.
The statistics were collated by the National Preventive Mechanism (NPM), a group of 21 bodies which have powers to inspect or monitor places of detention.
John Wadham, chairman of the NPM, said: "The figures we've been able to collate show staggering numbers of people are being detained across all four nations of the UK.
"However, because of gaps in official data, there is still a lot we don't know about precisely how many people are held in all the different places of detention."
The snapshot found that on March 31 last year:
- An estimated 87,499 adults over the age of 21 were detained in prisons in England, Wales and Scotland
- 5,872 people aged 20 or under were detained in youth custody in England, Wales and Scotland
- There were 3,389 adults held in residential immigration detention in the UK
- More than 15,000 individuals were detained under mental health legislation in England and Wales
The research also found an average of 70 people per month died in or shortly after being held in detention.
Mr Wadham said: "When people are detained behind closed doors the risk of ill-treatment is, unfortunately, always present and, as highlighted in recent inspection and monitoring reports from members of the NPM, they often experience very poor conditions in detention.
"To prevent ill-treatment and make sure detainees are safe and well-cared for it is vital we have a clear picture of the numbers and needs of people who are held in the different settings across the UK."