There are really only two measurements you need to know when picking out your shirt: your neck size and your sleeve length. Easy, right? Knowing the proper size of your neck and sleeves will ensure a better fit, and will minimize any tailoring you may want to do to the body of the shirt.
For your neck: Measure around your neck so that you graze your Adam’s apple. You should be able to comfortably fit two fingers under the measuring tape and your neck (both fingers pressing against your neck, not one beside the other adding more space outward). This gives you the room to breathe, while not being loose.
For your sleeve: Place your hand on your hip, with your arm bent at 90° (very important.) Have someone (preferably a professional, but a significant other should do, assuming they like you to look good) measure the distance from the center back of your neck (you can feel that bump from your spine about where your neck meets your torso) and go along the outer part of the arm, over the shoulder and elbow all the way to your wrist where your sleeve will end.
For your body: Dress shirts come in a variety of vague sizes. What the hell do they all mean? Here is what you really need to know. You take that same trusty measuring tape used to make that neck fit and that sleeve length right, and you take two quick measurements. First, around the widest part of your chest. It probably lands somewhere around the nipple. Don't make it too tight. For the second, measure around the widest part of the belly (so about your belly button.) This should be a comparable measurement to your chest, and now you know your torso measurements. You can bring them up when shirt shopping, or reference the size guide when looking online. It will help determine if you need a "Slim" "Regular" or "Classic" fit, or whatever the store's variation may be. The key in this is being open to tailoring. Off the rack, by definition, means it was not made for your body alone. Yes, you can find some great fitting options, but if you can't find the one that is right in the neck, sleeves, and body, take it to a tailor.