Doctors advise taking Viagra one-half to one hour before you expect to have sex. You can take it up to four hours before sex and still have it be effective, but the half-life of Viagra is usually four to six hours, so if you wait too long, you might not get to enjoy the effects for very long. If you take Viagra during or soon after a heavy meal, you should probably give it a little more time to work. Sometimes consuming a lot of high-fat foods can slow down the effectiveness a bit. Viagra will still work, but it may take a little longer.