Range:
The maximum distance at which a ship can be detected. If you have a range of 50 million kilometers, and your target is 51 million kilometers away, you won't see him. If he's 49 million kilometers away you will. (Unless your resolution is too high, see below.)
Resolution*50 is the minimum mass a contact has to have before it's picked up by the sensor. Smaller ships will show up, but not at the range specified by the design.
If you have a resolution 20 sensor, you'll be able to pick up anything with a mass of 1000 tons or higher on your sensors with maximum efficiency, but you won't see anything smaller until they're far closer to your ship.
EM tech and grav sensor strength just increase the efficiency of your design, and you should generally use the best you've got available.
Hope this helps.
EDIT: Maybe I should pay more attention at maths.