This is a really interesting question.
My first response is: a couple of years.
In my own experience and in observing other mothers, the weaning process seems to take years. Not days or weeks. Years.
Anthropological studies inform us that the natural age of weaning is somewhere between 2.5 and 7 years old.
Of course, most people would consider this question in the context of breastfeeding.
I tend to think of the weaning process as a developmental stage. So it doesn't matter if breastfeeding is ceased, the child is still weaning.
Stay with me! I know that sounds contradictory.
First we need to consider what weaning really is.
Weaning means the child is being introduced to solids.
So weaning generally begins around six months of age (it varies, along with other milestones). Generally a child is considered weaned when they no long receive milk. Now, most children in our culture are receiving milk of some sort into the toddler years and beyond. So at what point do we consider them weaned?
And this is why, I think of it as a developmental point. Even if breastfeeding is ceased, the process of weaning is still happening.
As the study above describes, the natural age of weaning occurs somewhere between 2.5 and 7 and just as with all developmental milestones the variation of normal is extensive.
If your child still needs you to lie with them to fall asleep, then you are experiencing the weaning process. You can not force it to happen any quicker than what is natural for the child. Just as you can not make a child walk sooner or teeth differently. It is what it is.
This natural process can be frustrating for some parents.
When this occurs, they are encouraged to 'wean' their babies (meaning to cease breastfeeding) or begin 'sleep training' in order to make the baby more independent. Many sleep training books will try to force this natural process to happen according to a strict set of rules that is contradictory to the baby's natural rhythms and needs. This can be stressful for the parents, and studies show detrimental to the baby. Breastfeeding cessation and sleep training often go hand in hand, even if it was not the intention of the mother. Does this mean the child is weaned?
I think it means the child is no longer breastfed. I think it also means (if the sleep training has been 'successful') that the baby has shut down. Which is quite different to weaned.
The same thing happens when we force-fed children. This might be through bottle feeding where the fed is considered finished with the empty bottle, rather than when the baby is actually full. Or it might be with the 'empty plate' rule that many of us were raised on. Not wanting to waste food (or the effort that went into the preparation), the plate must be empty...even if the child is not hungry. This results in the brain switching off the 'stop eating mechanism', which can then lead to problems that last a life time.
Often times, when parents understand and accept the natural process AND are surrounded by supportive and understanding people, their parenting journey becomes more joyful and less frustrating.
Weaning takes as long as it takes.
Sometimes the days a long, but the years are short.