How long did it take to wean your baby?

I’m just curious as to how long it took to wean your baby from breastfeeding? I’m weaning my early (starting 8months) because I have to go back to work soon. He has been EBF and I will be switching him to formula once completely weaned. I’ve already dropped one feed and will hope drop the next starting tomorrow. I’m just wondering how long the whole process might take. Also, what age was baby when you decided to wean and do you think that played a factor in how long it took?