When does your period end? *TMI warning*

Rhi ✨
Hellooo! I'm new here and have a question about the length of your periods? When does it end? Because the last day of AF I feel like I'm not actually bleeding because it's not red it's just brown, so I assume it's old blood that's just being cleared out. So does that still count as a day of my period? Or do I forget that as it's not a fresh blood day? And did AF finish the day before? 
Does that make sense? Sorry if that's gross! Thanks ladies! xx