If it grows to be more than 2", I'd say its too cramped in a heavily planted tank that won't have all 5G of volume as available swimming space.
If it grows to be more than 3-4" then a 20G at the smallest.
There are more exceptions at the 1-2" level but next to none at the 4" level.
That's usually the role of thumb before its reviewed on a case-by-case basis. However, I would say that the 3-4" rule is pretty universal regardless of the fish you have.