Lately, on average of about 1 per day, I have seen quite a few posts (mostly from newbies) regarding questions about what ring height should be used. They usually request pics for comparison. For all new guys, there is a systematic way of calculating ring height that doesn't require more than a simple elementary school ruler. You measure 3 things:
1. the height of the front of your base/rail from the barrel
2. the height of your rings from the top of the rail to centerline
3. the outside diameter of the bell of the scope (not the size of the objective lens)
Here is the equation:
[rail height + ring height] - [bell diameter x 0.5]
If the value is positive, then your bell will clear the barrel. Optimally, you want that bell to be about 1/4" or less over the barrel. This will give you a tight cheek weld and provide for more precise trajectory. Be sure to account for Butler Creek caps if you intend on using them.
If you are using a 40mm objective, then you can use the lowest rings and bases available, as the bell will certainly clear the barrel with no problem. i.e. don't worry if the bell ends up being higher than 1/4" over the barrel.
Hope this helps.
Glen Seekins added some good additional info to this post, so check it out as well.