If my calculations are correct should be about 130 gallons. That should be ok, although my guys were in a 55 gallon long and they swam the length of it often - the males needed their own space since they spent so much time fighting over the female.
Depending on the sex of your babies, you may find 40 gallon too small - the males fight quite a bit when they are of breeding age. I would say 55 gallons is the minimum but I know others have tried smaller tanks.
Update since it's been a while work has been hectic. I traded 2 of the babies to someone local for some cuttlefish artwork. Of the 2 he received they fought shortly after and one was killed off. The four remaining are growing and eating like pigs. So far I have seen no aggression between individuals even with 4 in a 40g. Judging by color and lack of aggression I'm thinking I have females left. So far they haven't even eaten the 2 chromis I cycled with and they are bigger than the chromis at this point easily.
Yeah that's my thought too if something will happen it will be soon. The 2 I traded away fought and killed each other 2 weeks after I got rid of them but the 4 remaining just hang out with no aggression. Since feeding cost went down since I'm in Florida and I can get fiddlers and ghost shrimp for free planning to keep 4 until I see aggression and re-home as needed.