Wt is right time for sexto avoid pregnancy?

Family Planning. Family planning contraception fails about 25% per year, so not accurate. Ovulation occurs day 14 of ideal 28 day cycle. Sperm lives in female for at 2-3 days but sometime much longer. Suggest: consider contraceptive, use family planning avoidance if you do not mind a pregnancy, leave about 4+ days on either side of ovulation (need to test for record of ovulation day).
Rhythm method. Avoiding pregnancy using the rhythm method works if you have a very regular cycle, and you know your own body well. Avoiding relations from 3 days before ovulation (sperm can survive for 3 days in the female) until 2 days after ovulation is the routine recommendation. If your willing to accept a failure; then this is fine.