Tom,
Ideally, the sooner the better. However, that is not always possible. Almost always, I put a new calf on a cow that loses a baby or even up to a few weeks old. The number one rule to make it easier and having a high success rate is to get a calf 3-5 weeks old that just came off another cow. This is easily done at a sales barn when the split an old cow and calf. Put your cow in the smallest compartment in your stock trailer. Put the calf in with her. Leave them together overnight and by morning the calf will be sucking. If you leave them in the trailer 2 or 3 days, they will almost always take, but you can also turn her out for an hour during the day for feed and water, then put her back in with the calf. The key is to keep them in the trailer, together. They will bond.
You do not want to get a calf less than a couple of weeks old and you do not want to get a dairy calf or a bottle calf. These will not have the strength, aggressiveness, or know-how to get in and fight to make the cow accept them.
Today, I bought 3 calves at the sales barn that were split from their mothers at the sale. 2 were for me and 1 for a neighbor. We lost the calves a few nights ago when cows freshened in below zero temps in the snow. I put the calves with the cows at 5pm, by the time I drove the 3 miles from the pen to my house, one calf was sucking. By 9pm the other calf was sucking. One cow lost her calf 3 days ago and the other lost her's a week ago. With all the snow and ice, there have been few sales to buy calves. Once you get more than a week after the loss, the cow may not come back to much milk, even after taking the calf. However, like Backhoe said, if you milk her out, she will keep giving milk and you can put the calf on anytime one becomes available. Since I have been using this method the last 10 years, I have had a 100 percent success rate.
I used to get the baby calf and fight the mother and hold the calf up and try to teach it to suck. After I learned this method, I keep thinking what a fool I was and how lucky I was that I did not get hurt.
Good luck, and pm me if you have any questions.