Males are longer and thinner in shape, often with some gold coluration. Females are shorter and thicker comparatively. It is more obvious with a little close comparism and heavy feeding. Males will also chase females quite regularly since they spawn daily. If your really unsure then get some smaller size and some bigger size fish. They are group spawners so the more fish the easier they are to breed but aim for twice as more males than females ideally.
Info on the zebra danio is extensive and practically identical if you want more details.