Skip to main content
Body, pain & sexual function

Erectile dysfunction: causes, health checks and treatment options

AltFTool Health Editorial TeamFact-checked 7 min read

Quick answer

Erectile dysfunction (ED) means having trouble getting or keeping an erection. It is common, especially with age, and is often linked to stress, tiredness, alcohol, smoking or conditions such as diabetes, heart disease and high blood pressure. Because it can be an early sign of heart or blood vessel problems, it is worth seeing a doctor, and effective treatment is available.

Key points

  • Occasional difficulty with erections is very common and is usually linked to stress, tiredness or alcohol.
  • Ongoing erection problems can be an early warning sign of heart disease, diabetes or high blood pressure.
  • Stopping smoking, drinking less, staying active and managing weight can improve erections.
  • A doctor can discuss treatments, including prescription medicines called PDE5 inhibitors.
  • Pills sold online without a prescription may be fake or unsafe and can interact dangerously with other medicines.

What is erectile dysfunction?

Erectile dysfunction, also called impotence or erection problems, is when it is difficult to get or keep an erection firm enough for sex. Most people with a penis experience this now and then, and an occasional problem is not usually a cause for concern.

If it keeps happening over several weeks, it is worth talking to a doctor. ED becomes more common with age, but it can affect people at any stage of adult life and is very often treatable.

What causes erection problems?

An erection depends on healthy blood flow, nerves, hormones and a relaxed state of mind, so problems with any of these can play a part. Causes often overlap.

  • Psychological factors: stress, anxiety (including worry about sexual performance), depression and relationship difficulties.
  • Lifestyle factors: tiredness, drinking too much alcohol, smoking and recreational drug use.
  • Physical conditions: diabetes, heart disease, high blood pressure, high cholesterol and being overweight.
  • Hormonal issues, such as low testosterone, and conditions affecting the nerves.
  • Side effects of some medicines, including some antidepressants and blood pressure medicines. Do not stop a prescribed medicine without talking to your doctor first.

What lifestyle changes help with erectile dysfunction?

Changes that are good for your heart and blood vessels are often good for erections too. They can help on their own or alongside medical treatment.

  • Stop smoking, with support from a stop-smoking service if you need it.
  • Cut down on alcohol and avoid recreational drugs.
  • Be physically active most days and aim for a healthy weight.
  • Look after sleep and find ways to manage stress.
  • Talk openly with a partner, which can ease performance anxiety.

What treatments might a doctor discuss?

Treatment depends on the cause and on your overall health. The most commonly prescribed medicines belong to a group called PDE5 inhibitors, which help increase blood flow to the penis. They are only suitable for some people, are not safe with certain heart medicines, and should only be taken on a prescription or the advice of a doctor or pharmacist who knows your medical history.

Other options include vacuum pumps, treatment of an underlying condition such as diabetes or low testosterone, and, less often, other medicines or surgery. If anxiety, depression or relationship issues are involved, psychosexual therapy or counselling can be very effective.

Is it safe to buy erection pills online?

Medicines sold through unregulated websites, social media or unlicensed sellers may contain the wrong dose, undeclared ingredients or no active medicine at all. Some products marketed as herbal have been found to contain hidden prescription drugs. These can cause serious harm, particularly for people taking heart medicines.

If you want to get treatment online, use a registered pharmacy or a regulated online health service that asks about your medical history, and ideally speak to your own doctor too.

When to see a doctor

  • Call emergency services if you have chest pain, shortness of breath or feel faint, especially during or after sex or after taking an erection medicine.
  • Get urgent medical help for an erection that lasts more than four hours or is painful.
  • See a GP if erection problems last for more than a few weeks.
  • Talk to a doctor if you also have symptoms such as passing urine more often, feeling very thirsty or tired, or a known heart condition.

Frequently asked questions

Is erectile dysfunction common?

Yes. Most people with a penis have difficulty with erections at some point, and ongoing problems become more common with age. Being common does not mean you have to live with it: in most cases a cause can be found and treatment helps. A doctor will not be surprised or judgemental when you raise it.

Can anxiety cause erectile dysfunction?

Yes. Stress, anxiety and worry about performance are common causes, particularly in younger people. A clue is when erections happen normally at some times, such as on waking, but not in other situations. A doctor may still check for physical causes, and counselling or psychosexual therapy can help with the psychological side.

Can I get treatment for erectile dysfunction without seeing a doctor?

In some countries, certain medicines for ED are available after a consultation with a pharmacist. Even so, seeing a doctor is worthwhile, because ED can be an early sign of heart disease, diabetes or high blood pressure that deserves checking. Always avoid unregulated online sellers, which may supply fake or unsafe products.

  • Emotional intimacy

    Low sex drive: common causes, mismatched desire and getting help

    Sex drive (libido) naturally varies between people and over a lifetime, and partners often have different levels of desire. A drop in desire is commonly linked to stress, tiredness, relationship problems, depression or anxiety, some medicines, hormonal changes or alcohol. If it worries you or affects your relationship, a GP can look for causes and suggest options such as counselling or sex therapy.

    7 min read

  • Consent & communication

    How to talk about sexual health with a partner: a practical guide

    Talking about sexual health with a partner means discussing STI testing, contraception and personal boundaries before you become intimate, ideally at a calm, private moment. Using simple, non-judgemental phrases and sharing your own information first makes the conversation easier and shows care for both of you.

    6 min read

  • Body & function

    Pain during sex: common causes, treatment and when to see a doctor

    Pain during or after sex is common and is usually caused by something that can be treated, such as vaginal dryness, an infection, a skin condition, involuntary muscle tightening (vaginismus) or a condition like endometriosis. It is not something you should push through: a GP, gynaecologist or sexual health clinic can help find the cause.

    7 min read