On the fifth day, before sunset, the woman performs a hefsek tahara. A hefsek tahara is a regular bedikah which shows that the period has stopped completely.
Thus, a woman who got her period any time between sunset of Shabbat and sunset of Sunday, would do a hefsek tahara on Thursday afternoon, prior to sunset. She would then begin counting her shivah neki’im – seven clean days, on Friday.
Some Sefardic communities do the hefsek tahara on the fourth day. In the above example that would mean that the woman can perform the hefsek tahara on Wednesday, and start shivah neki’im on Thursday.
A woman may clean herself internally prior to the hefsek tahara. However, she must wait ten or fifteen minutes between cleansing herself and the hefsek tahara.
If a woman did a hefsek tahara and it was not clean (meaning there was red or pink on the cloth, other colors do not matter), she may try repeating the hefsek tahara until sunset. It is not recommended to do more than two or three hefsek taharot, as it can cause irritation in the vaginal canal. It is preferable to wait ten or fifteen minutes between each hefsek tahara. Therefore, a woman should not wait for the last minute to do the hefsek tahara. Rather, she should try to do a hefsek tahara an hour or so before sunset. This will give her time to perform another hefsek tahara if a problem arises. This will also give buffer time between sunset and the hefsek tahara in case some household matter arises which delays the hefsek tahara.
If necessary, a woman can do a hefsek tahara earlier in the day.
A hefsek tahara cannot be done after sunset under any circumstances. If one is unsure if the hefsek tahara was before or after sunset, a rabbi must be consulted.