According to PetCo, the size of the fish determines how many fit properly in a tank. Allow a full gallon of water for each inch of adult fish. According to this calculation, two 1-inch fish or one 2-inch fish are able to share a 2-gallon tank.
It is also important to take into consideration the capacity of the tank's filtration system and to maintain pH-balanced, clean water in the tank. If the filtration system is inadequate for the size of the tank, keeping the water clean is more difficult. If a filtration system is upgraded, it is possible to increase the amount of fish kept in the tank.