There's a website called Cavy Cages that give you minimum and preferred sizes.
My 2 adult boars have a 4'x2' indoor cage for winter (height is about 18-20" but it's a plastic base and wire top,so airy). They are in from 7pm til 6.30 am in winter, up to their ears in hay. But they get very arsey in the indoor cage.
They like hidey spaces, (ideally 1 per pig + an extra) because they do need some time away from each other.
And even in July/August there have been days when my pigs haven't been out to graze in their run.
My GPs have my DC old playhouse (wooden, on a plinth) which is 5'5" x 5'7" (I measured it properly last week).
They have a wooden haybox, with a cardboard box inside, a willow hedgehog house and 2 further cardboard boxes.
Then there's a pellet bowl,a water bowl ,a salad plate . And a wide ramp to go up onto the haybox lid.
Really, the more space, the better. They need to excercise and explore. They need to keep themselves warm and snuggly when it's cold but have space to have ventilation when it's hot. And space to chill and get out of each other's faces when need be.
And they appreciate (but don't always use) a toilet area. Mine pee in the cardboard box inside the haybox (I put lots of newspaper in for them)