Most chainsaws can operate up to three different bar sizes. Guide bars are measured in length, from the tip of the bar to the heel, and range in size from 14 to over 40 inches. Check the specifications in your model's operator's manual to see what size bars you can run on your saw.
Changing the Bar
Unfortunately, changing the bar isn't as simple as just taking off your old bar and putting a new one on. The new bar must fit tightly on the metal bar posts so it doesn't wiggle around, which, if the bar is too small, will create a dangerous situation. The replacement bar also must align properly with the oiler nipple. This nipple sits just beside the bar posts and connects the oil pump to the bar. If the bar doesn't rest directly on the nipple, you won't lubricate your bar during cutting. Chainsaw bars will generally have a string of letters and numbers on the heel, which indicate the size and pitch of the guide slots. If you can't find it there, get the size and pitch from the manufacturer, as these numbers will vary with every model and every manufacturer.
Changing the Chain
If you change the bar, you must also change the chain. The chain needs to fit precisely onto the bar in two ways. First, it must be exactly the right diameter to fit snugly around the bar and sprocket. Second, the drive links, on the inner ring of the chain, must fit exactly in between the guide slots on the new bar. If the guide links are too small, you'll throw your chain off constantly; if they're too large, you'll create a lot of pressure, which can bind the chain and snap it in half at dangerous speeds. The pitch and measurement of the bar is located on the heel. The pitch of the chain will be located on the box it came in. These measurements must match; if they don't, you will create an extremely dangerous cutting situation.
Changing the Sprocket
The drive links on your chain must fit precisely into the grooves on the drive sprocket. Sitting at the back of the bar, and atop the clutch, the drive sprocket transfers power from the engine to the chain. The chain, therefore, should glide smoothly around the sprocket. If the guide links on the chain are too small, the chain will grind down the sprocket and the drive links. If the guide links are too large, you'll bind the chain and risk snapping it or throwing it into your legs.
Besides cutting your leg, the risks of changing out a bar for an improper one could mean your life. Using anything other than what's recommended in your model's operator's manual can create an extremely hazardous situation, even when wearing the proper protective equipment. So follow the manufacturer's guidelines to reduce the risk of complications. Not only will you save your legs, you'll also prevent unnecessary damage to the chain, clutch, and crankshaft.