The easiest way to do this is:
1. create a calculated field to calculate male number of records:
IF [***] = 'male' THEN [Number of Records]
2. Repeat for females
IF [***] = 'female' THEN [Number of Records]
3. Create calculated field to find the difference:
I have attached some screenshots for your reference.
Hope this helps.