There are several ways to determine your target heart rate. One of the simplest is this: maximum heart rate (220 - age) x 70%. Thus, the target heart rate for a 40 year-old would be 126.
Some methods for figuring your target rate take individual differences into consideration. Here is one of them:
Your resting heart rate should be determined by taking your pulse after sitting quietly for five minutes.
When checking your heart rate during a workout, take your pulse within five seconds after interrupting exercise because it starts to go down once you stop moving. Count your pulse for 10 seconds and multiply by six to get the per-minute rate.
(Based on Information Provided by the President's Council on Physical Fitness and Sports)