How do I calculate the length of my cycle?

From the first day of your last period to the first day of your next period. That would be the length of your cycle.