Generally speaking, you don't need to worry too much about tips when you're in China. Tipping in restaurants, spas, taxis, salons, etc. is not expected—and it can be a welcome respite for those from countries where it is a real headache calculating how much one should tip.
If you do choose to leave a small tip, like the change from the dinner bill, it is very possible that the staff may give chase to return the money as they will assume you had left it by mistake. In other locations, like Western hotels, a service charge might be added, but again, no tipping is expected.
An exception is when you go on organized tours. Who knows exactly why tipping is expected on tours, but it's come to be the norm. It is customary on tours to tip the guide and driver a certain amount per day. The guide gets a larger tip than the driver but both will expect and appreciate the tip.
Of course, if you feel very strongly against the tip, you don't have to give a tip. However, if you thought the guide/driver were especially bad, then you should report any bad behavior back to the tour operator so they know and can take appropriate steps.
How Much to Tip
We asked tour operator China Odyssey Tours to provide guidelines:
If you are traveling in a small party like 2 to 4 members, we suggest approximately US $10 per day per person as tips for your tour guide and USD $5.00 per day per person for the driver as gratitude for their service. Gratuities can help improve the service for you. Anyone who has received a tip will recognize that his services have been appreciated. For your convenience, we suggest you tip the guide and driver when they see you off at the airport or pier at the end of each city tour.
Roughly, decide how much you want to tip your guide per day as a total. Then multiply that by however many days you've been on tour (and divide by however many people are in the group. The larger the group, the greater the total daily tip rate should be). When you've arrived at the guide's total, divide by half to get the driver's amount.
Note: This doesn't mean you give half to the driver. For example, if you've decided to give your guide 100RMB per day as a tip, the driver will receive 50RMB per day.
When to Tip
As for when to give the tip, often you'll find that your guide will see you right into the lobby or into the airport. If this makes you uncomfortable just say directly that you're fine to go inside on your own. Sometimes guides are obligated by their company to see you walk through security.
It's best to tip the driver as you leave the vehicle. Then when you and your guide say your final farewells, hand the guide the tip. If you can let your guide know specifically what you liked about his/her style, it will help them in the future.
You might have booked a really extravagant tour from your home country and feel that the added gratuity on top is egregious. Before you decide not to tip though, you should speak to the tour operator and ask them what is customary. Don't forget, your guide and driver are probably just simple employees of a larger operation.
While you may have paid a lot of money for your tour, but your guide and driver are very likely not seeing a big cut of that. They are just doing their jobs.
You may find yourself on a small walking tour or guided tour that you booked through an independent operator. There are many people operating specialized shopping and walking tours (e.g. Francine Martin's shopping tours in Shanghai or Marcus Murphy's adventure tours in Qingdao). Since you are paying the tour fee directly to the operator/guide and there aren't any people in between, it is up to you whether to tip or not.