the best way to tell is the fins, the males anal and dorsal will be long and pointed, in youg ones it may not be very elongated but the tips should still be pointed.
Nucha hump and more intense coloring in males, along with more pointed fins. I'm pretty sure there are other ways too, maybe someone else can elaborate.
I sexed mine by watching her lay eggs,
As a general rule the females are darker less coloured with a more pronounced spot on their flanks and the back of the dorsal fin is rounded off , not pointed like the males.
This is a 5" female