It's impossible to give a specific number for how many hermit crabs can fit in a 20-gallon tank.
* Hermit crab size: Various sizes need different amounts of space.
* Substrate depth: You need enough substrate for burrowing and hiding.
* Decorations: Hides, branches, and enrichment take up space.
* Social dynamics: Some species are solitary; others prefer groups.
Instead of focusing on a specific number, consider:
* Space per crab: Aim for at least 1 gallon per adult crab.
* Vertical space: Hermit crabs like to climb.
* Substrate depth: Aim for 4-6 inches.
* Proper enrichment: Provide hides, branches, and decorations.
In general, a 20-gallon tank is a good starting point for a small group of hermit crabs (3-5) if you provide adequate substrate depth, decorations, and vertical space.
It's important to research the specific species of hermit crab you are interested in to determine their individual needs.