Bike fit is important for safety and comfort reasons. To get your bike to fit better, you may need to adjust your handlebars so that they are easier to reach and use. Handlebar reach is the distance from the end of the seat (or saddle) to the center of the handlebars.
Adjust your saddle before beginning adjustments on the handlebar reach. You want the saddle to be at the right height and be comfortable. Once you have that done, you'll be in a better position to work on the reach so that you won't have to redo adjustments later.
Set your bike up on a trainer so that it's level. You'll want to climb on the bike and pedal until your upper body is relaxed. Put your hands in their normal position on straight handlebars or on top of dropped handlebars.
Have someone look at your position on the bike. For a road bike, you'll want a right angle between your body and arms down to the handlebar. If you don't have someone to help you, place the bike and trainer by a mirror or use a video camera to capture your position for review.
Imagine drawing a line down from your nose to the center of the handlebar. Ideally, you want about an inch between the line and the center. In other words, your nose, in a neutral body position, should be close to the distance of the handlebars.
Examine how you feel on the bike. If you feel like you need to scoot forward, the stem of the handlebars is probably too long and if you feel like you need to scoot backward on the saddle, the stem is probably too short.