which time did I ovulate?

S

I’ve had two positive results this cycle but the first was CD 17 and the second was CD 21. I thought I was ovulating the first time around but on CD 21 I had very obvious cramps. My periods vary from 26-31 days.