For arguement sake lets assume a normal cycle of 28 days.
Sperm can live for up to 5 days and an eg is viable for around 36 hours after release.
In a normal 28 day cycle ovulation occurs around day 14 (14 days before the period) so from 5 days before that (day 9) to 36 hours after (day 15/16) is the fertile window.
Knowing her period was 4/5 days ago doesn't help you need the start date because day one is always the first day of the period but the period could last 3 days or could last 7 days.
And you see 4/5 days from day 3 (reasonably safe) to 4/5 days from day 7 (not safe) yeah?
Pre-cum can contain millons of sperm, sperm are made on demand, it has nothing to do with if you masturbated or not (and nothing to do with whether you pee'd or not either)