Adjusting a Bicycle
This is largely a matter of personal choice. For racing, the issue is one of aerodynamics; for recreational cycling it's one of lower-back comfort and getting the weight off your hands.
An old rule of thumb is to start with the top of your handlebars an inch lower than the top of the saddle. I like to keep the handlebars higher, nearly even with the top of the saddle, sacrificing a little in wind resistance in exchange for comfort and an easier view down the road without craning my neck.
As with saddle height, don't exceed the maximum height line inscribed on the stem. Raising the handlebars higher than this risks breaking the stem, which could leave you cruising along with no way to steer.
Making the adjustment
The stem is held in place by a long expansion bolt inserted from the top. Tightening the bolt enlarges the diameter of the stem slightly, pressing it firmly against the inside of the head tube.
To change your handlebar height, loosen the stem bolt with an Allen wrench but don't remove the bolt completely. If it loosens a quarter of an inch or so, but the stem won't move, bang on top of the bolt with something hard to knock the expansion nut loose. Then slide the stem to the desired position.
Retighten the bolt firmly enough that the handlebars won't twist when you hit a bump, but not so tightly that the bar ends might impale you rather than twist in a crash. To test for proper tightness, stand in front of the bike holding the front wheel between your knees. The stem should rotate grudgingly to a hard twist. If you don't know how tight is tight enough, ask a bike mechanic to demonstrate.
The tilt of your handlebars affects how comfortable it is to reach the lower position on drop handlebars, and how much weight rests on your hands. It's not as important on upright handlebars, although it will affect the tilt of your extension levers.
Even for drop handlebars there are enough styles on the market that there's no simple rule of thumb for this adjustment. Most people, however, will probably want the handlebar ends pointing somewhere between level and aimed at the rear hub. Tilting them dramatically upward or turning the handlebars upside down, as a few people do, is dangerous because it puts the bar ends right where your stomach might hit them in a crash.
Making the adjustment
Loosen the bolt clamping the handlebars to the stem and rotate the bars as desired. When finished, make sure this bolt is tight. If it slips, you'll be lucky not to crash. Don't tighten it absurdly; I watched a mechanic do that once, shearing it and sending the broken end shooting across the room like a bullet. Do that on the road, and you'll be stranded.
Details mentioned in this article were accurate at the time of publication