A woman must wait a minimum of five days after her period began before confirming that it ended. Included in these five days is the day that her period started. Some Sephardic communities wait only four days. In common practice, most women do not get a clean hefsek tahara before the fifth day.
A woman who is niddah because of a ketem must also wait five days before doing a hefsek tahara.
Five days includes the day that the period started. For example, if a woman got her period on Sunday, she may do a hefsek tahara on Thursday. It is not uncommon for a woman’s period to extend longer than five days, making it difficult to perform a hefsek tahara before the sixth, or even the seventh day.
The wait time is only for a woman who was permitted in marital relations prior to becoming niddah or finding a ketem. If she was already niddah, and during the seven clean days she saw a ketem, she does not have to wait five days before proceeding to the hefsek tahara stage. Similarly, if she saw a ketem and was already niddah when her period started, she need not wait five days after her period started. Rather, she may do a hefsek tahara as soon as the period flow stops.
A woman who saw a ketem and was told to separate from her husband to ensure that they do not mistakenly have relations when she is starting a period, may count that day as the first day of the five days. Meaning, if she saw a ketem on Sunday, and was told to abstain from relationships until Monday, and then on Monday she got her period, she may count Sunday as the first day of the five days.
One who’s period started during bein hashmashot may count that day as the first day. For example, if the period started Sunday night during bein hashmashot, the woman may count Sunday as day one of the five days, even though her period started after shkia.
One who went to mikvah and saw a ketem before she was intimate with her husband does not need to count five days. She may do a hefsek tahara as soon as the blood flow stops.
A woman who mistakenly did a hefsek tahara before five full days elapsed, and subsequently counted the shivah neki’im and went to mikvah, should consult a rabbi.