That is a bit of a tricky question. Clearly their roosting area can be smaller, I used to have 6 next boxes for my 3 hens, but they never even used one side so we removed some and now have 3 nest boxes. In the winter all 3 cuddle into a single box, they are very close knit group!
During the day when they are active, they need as much space as you can give. I have a 18 sqm run which is a full height space (3 chickens and 3 ducks), and there is room so the birds can get away from the group and relax alone if they so choose. I still feel that 18 sqm is not enough, they get to free range the yard for a few hours. They get bored in the run and look forward to their time out. I am not sure what the best minimum is, most of the literature on that is the absolute minimum for efficient eggs / broiler production. Clearly those are not appropriate for lifelong healthy thriving birds. My partner and I don't need many eggs. We keep a small flock so that we know each bird can receive medical care. 6 birds needing the vet is far less than 30, if you know what I mean.
I say what is the most you can give. Try and give them that, or keep fewer birds.
You may enjoy this article:
Thinking chickens: a review of cognition, emotion, and behavior in the domestic chicken