I would say that there is no 100% sure until the tortoise is at least 5 inches. If it looks to be a male (long tail, slit shaped vent), then it is almost positively a male. If it looks like a male, it could still be growing, and may turn out to be a female!! Females have a much shorter tail, it is more wedge-shaped, and the vent is shaped like an asterisk (*) rather than a slit.
Here are a few pics that give you an idea:
...a 'classic' male (fully grown)
...a young male (still growing, about 5 inches shell size)