How to Get Hard

Kristin Hall, FNP

Medically reviewed by Kristin Hall, FNP

Written by Our Editorial Team

Last updated 7/5/2022

As a man, getting and maintaining an erection is an essential element of maintaining a healthy, fulfilling sex life. Understanding how to get a hard erection and keep it is an important element. 

Unfortunately, getting and staying hard isn’t always as simple as it seems. Every year, tens of millions of men in the United States alone are faced with some degree of erectile dysfunction (ED) or erection problems, preventing them from enjoying a normal sex life.

Erectile dysfunction can occur in men of all ages. Statistics published show that about 70 percent of men will be affected by ED by the age of seventy.

It’s also common in younger men, with as much as 40 percent of men affected by some degree of erectile dysfunction by the age of forty.

In short, if you’re wondering how to maintain an erection during sexual activity, you’re not alone.

Luckily, options are available. Below, we’ve listed the most effective, science-backed ways to get hard faster and improve your erection quality, ranging from lifestyle changes to FDA-approved medications.

Before considering medication, it’s important to think about how a penis gets hard and look at your lifestyle and general men’s health.

From the food you eat to your level of physical activity and exercise habits, your lifestyle can have a surprisingly large impact on your ability to get harder erections and stay hard when you have sex.

How to Get Harder Erections: Diet and Lifestyle Changes

When you’re suffering from erectile dysfunction, a common first thought is to turn to medications like sildenafil (the active ingredient in Viagra®) and others to fix things quickly.

While ED medications are highly effective, it’s also important to look at your lifestyle and general health. 

From your diet to your level of physical activity and exercise habits, your lifestyle can have a big impact on your ability to get an erection, stay hard and perform in the bedroom in general.

If you’re prone to ED, try making the following lifestyle changes to improve your general health and sexual performance. 

Reduce Stress

Stress can affect almost every aspect of your health, from your mental function to your physical wellbeing. It’s also closely linked to erectile dysfunction and other sexual performance issues.

When you’re stressed, your body undergoes changes on a hormonal level, including a ramping up of your production of the hormone cortisol. When your cortisol levels are high, you may be more at risk of experiencing anxiety and depression, both of which can affect sexual function.

While there are few studies that specifically track the effects of stress on erection quality, there are several studies linking stress with poor sexual satisfaction.

So, if you’re wondering how to get a harder erection, stress reduction may be your answer.

You can reduce stress by practicing relaxation exercises, staying active and spending time with your friends and family.

Our guide to the psychological causes of ED goes into more detail on the effects that stress can have on your sex life, as well as treatment options for psychological erectile dysfunction. 

Stop Watching Porn

Believe it or not, your masturbating and porn-watching habits (if you watch porn, of course) could have a negative effect on your sexual performance. 

In recent decades, a new phenomenon has emerged where young, otherwise healthy men find it difficult to perform sexually when they’re with a partner. 

This is often referred to as “porn-induced erectile dysfunction,” and it can potentially have a big effect on your sexual performance and enjoyment. 

Porn-induced ED occurs when your porn habits start to interfere with the parts of your brain that are associated with reward sensitivity. This can affect your sexual performance and reduce your brain’s response to sexual stimulation.

In a recent study published in the journal, Computers in Human Behavior, researchers found that watching porn (among other online sexual activities, or OSAs) is closely linked to both lower overall sexual satisfaction and lower erectile function.

In short, watching porn excessively both reduces your level of sexual enjoyment and could play a role in making it harder to get and maintain an erection.

The solution? Consider limiting your porn consumption, or avoiding porn outright. Our guide to porn and erectile dysfunction explains how you can do this in more detail, with a simple 90-day plan to help you take action and improve your sex life and erection quality.

Exercise Regularly

When asking how to get a penis hard, blood flow is the most important piece of the puzzle. When you’re aroused, blood flows into your penis to give it the size and firmness that are required for penetrative sex.

When your cardiovascular system is strong and healthy, the process of getting and maintaining an erection becomes much easier for your body.  Because of this, good cardiovascular health is an important part of getting an erection quickly and staying hard during sexual activity. 

One of the most effective ways to improve your heart health and function is by keeping yourself active with regular exercise. 

In a meta-analysis published in the journal Sexual Medicine, researchers found that 40 minutes of moderate to vigorous exercise four times a week is enough to reduce erectile dysfunction.

However, this effect only occurred in men who experienced ED as a result of physical conditions such as obesity, metabolic syndrome, inactivity, hypertension and cardiovascular disease.

Over the long term, this level of exercise is also linked to improvements in your overall wellbeing and heart health. 

In short, there’s no need to commit to an intense exercise regimen to improve your erections or general sexual health (although, if you’re a gym enthusiast, by all means, go for it). However, regular exercise can help improve other health conditions, promoting better overall health in general.

Instead, try to focus on getting in at least four moderately intense workouts a week and making exercise a regular part of your daily life. 

Viagra online

Genuine Viagra® makes it possible

Eat (and Drink) Healthy

Although your diet isn’t as closely linked to erectile dysfunction as factors like your activity level and cardiovascular health, it can still play a role in helping you get erect faster and maintain an erection (or, if you eat poorly, prevent you from getting hard in the first place).

Erectile dysfunction is closely linked to high blood pressure. This means that foods that increase your blood pressure could have a small but noticeable negative effect on your ability to get hard and sustain a longer erection adequate enough for sexual activity.

Common foods that raise blood pressure include deli meats, canned foods, fast food and other foods that are high in sodium. In fact, anything that’s high in sodium is likely to raise your blood pressure and affect blood flow throughout your body. We know -- it’s a bummer.

On the other hand, a diet that’s rich in fish, nuts, legumes, vegetables, fruits, whole grains, fresh ingredients and unsaturated fats may help to keep your blood pressure in the healthy range.

In addition to food, alcohol consumption can have an impact on your erectile health and sexual performance. 

If you drink alcohol often, reducing your consumption could help to improve your erections and sex life. While a glass or two of wine or beer isn’t likely to hurt your erections, studies show that there’s a real link between chronic and persistent alcohol use and sexual dysfunction.

Quit Smoking

As we’ve mentioned, getting and maintaining an erection during sex is all about optimal heart health.

Very few habits are as bad for your cardiovascular system as smoking, meaning it might be a good time to consider quitting if you’re starting to experience sexual performance issues.

Smoking harms your erections in several ways. First, the nicotine in cigarettes can cause your blood vessels to narrow, reducing the amount of blood that can flow into the soft tissue of your penis when you’re sexually aroused.

This means slower, weaker erections and a higher risk of losing your erection during sex due to poor blood flow.

Smoking also contributes to atherosclerosis or the buildup of plaque inside your arteries. This further reduces your cardiovascular health and harms blood flow, increasing your risk of getting heart disease and erectile dysfunction, according to an article published in the journal, Prostate International.

In short, smoking harms your erection quality and sexual performance from multiple angles, all while damaging your health in general.

If you smoke and have ED, it’s important to think about quitting smoking to improve your health, enhance your life and boost your sexual performance.

Sleep More

If you’re a busy person with a demanding schedule, it’s easy to sleep less time in bed each night than you should.

About 35 percent of American adults fail to get the recommended seven-plus hours of sleep per night, with more than 40 percent of people in some states sleeping less than they should.

Sleep disorders can affect your erection quality in several ways. First, it’s closely associated with higher levels of stress, which can affect your sex drive and sexual performance.

Second, it’s also linked with lower testosterone levels, which could potentially contribute to ED and reduced sexual desire.

In short, sleep is very important for maintaining optimal sexual performance and sexual arousal. Try to get seven to nine hours per night, especially if you have a busy daytime routine. This may help you to avoid most sleep-related negative effects on your erections.

Maintain a Healthy Weight

Finally, try to maintain a healthy weight. Research has found that the medical condition of obesity is a major risk factor for erectile dysfunction, meaning your risk of experiencing erection issues may increase along with your waistline.

In a study from Poland, researchers found that men with a body mass index (BMI) in the obese range were three times more likely to experience sexual dysfunction than men with a weight in the normal range.

Even being overweight can increase your risk of ED. In the same study, men with a BMI in the overweight range had 1.5 times higher risk of developing ED.

While there’s no need to look like a fitness model, maintaining healthy body weight is one of many things that you can do to improve your erectile function and sexual performance, as well as reduce your risk of developing type 2 diabetes.

ED treatments, delivered

Generic for Viagra (sildenafil)

The more affordable FDA-approved medication that treats Erectile Dysfunction at a quarter of the cost. 🙌

Generic for Cialis (tadalafil)

Affordable and helps get the job done. Generic Cialis helps you get and maintain your erections through a simple, daily dosage.


The OG Little Blue Pill that made its name as the first prescription Erectile Dysfunction treatment.


Cialis helps you get and keep stronger erections with a daily or as-needed pill.

How to Keep an Erection: Medications

Changes to your lifestyle can help to treat some causes of erectile dysfunction. However, if you have ED, you’ll often get the best results by combining lifestyle changes with prescription drugs to improve your erections. Seek medical advice to find the right medication for you.

Currently, there are four FDA-approved medications for treating ED and improving your sexual performance: sildenafil (sold as Viagra®), tadalafil (Cialis®), vardenafil (Levitra®) and avanafil (Stendra®).

All of these medications are PDE5 inhibitors that work by making it easier for blood to flow into your penis. They come in tablet form and are designed for use anywhere from 30 minutes to a few hours before sex. 

Our guide to what you should expect from ED medication explains how these medications work in more detail.

You can also learn more about each medication and its effects below.

Sildenafil (Generic Viagra)

Sildenafil is the most widely used of the four FDA-approved erectile dysfunction medications. It works by inhibiting PDE5, an enzyme that’s responsible for regulating blood flow to and from the soft tissue inside your penis.

You can find sildenafil sold under the brand name Viagra, though it’s now available as a generic medication. Brand name Viagra and generic sildenafil work in exactly the same way and cause the same improvements in sexual performance. 

Sildenafil takes around one hour to fully start working, meaning you’ll want to take it before you plan to have sex. The effects of this medication wear off after about four hours. 

While sildenafil is active, you’ll generally find that you get an erection easier, faster and can stay hard during foreplay and sex. 

Tadalafil (Cialis®)

Tadalafil is another popular medication for improving your erections and helping you to stay hard during sex.

It works the same way as sildenafil -- by inhibiting the action of the PDE5 enzyme on blood flow to your penis.

You can find tadalafil sold under the brand name Cialis and as a generic medication. Like Viagra and generic sildenafil, brand name Cialis and generic tadalafil work in exactly the same way and have the same effects on your erectile function.

Compared to sildenafil, tadalafil is a long-lasting erectile dysfunction drug. Its effects last for up to 36 hours per dose, making it an option worth considering if you want to treat ED and improve your sexual performance for one or several days at a time.

Vardenafil (Levitra®)

Vardenafil is another ED medication with similar effects to sildenafil. It starts working within one hour and lasts for slightly longer than sildenafil, with the effects usually starting to wear off after around five hours.

You can find vardenafil sold under the brand name Levitra, or as a generic medication. As with other brand name and generic ED drugs, both Levitra and generic vardenafil contain the same active ingredient and produce the same effects. 

Avanafil (Stendra®)

Avanafil is a newer ED medication. It was designed throughout the 2000s and approved by the FDA in 2012 as an alternative to sildenafil, tadalafil and other PDE5 inhibitors. 

Currently, avanafil is only available under the brand name Stendra. Since it’s a new medication for ED, a generic version isn’t yet available. 

Avanafil starts working faster than other ED medications. In fact, it’s designed for use about 15 minutes before sex. This makes it a convenient option if you prefer an ED medication that you can use right before sex, instead of an hour ahead of time.

It’s also less likely to cause certain side effects than older ED medications, as it targets fewer of the other PDE enzymes.

Our guide to Stendra explains more about how avanafil works and its advantages over other ED drugs.

Lidocaine Spray

Lidocaine is a topical anesthetic that lowers the sensitivity level of specific parts of your penis, helping you last longer in bed.

While it won’t help you to physically get hard, it can help you to stay harder for longer and avoid reaching orgasm and ejaculating too quickly during sex. 

Studies show that when used in combination with sildenafil, delay spray with lidocaine increases the total amount of time before ejaculation.

In short, used together, PDE5 inhibitors and lidocaine spray may help to improve your erections and prevent you from ejaculating earlier than you’d like to.

Our guide to how lidocaine spray works explains this medication in more detail, as well as how you can use it to avoid premature ejaculation and improve your sexual

Sildenafil citrate

Get hard for 95% cheaper than Viagra

Learn More About How to Keep an Erection

How to improve erections and sexual performance -- whether that means getting harder easier, lasting longer or just having a more enjoyable time in bed -- involves several factors.

First, there’s your cardiovascular function and overall physical wellbeing. Second, there’s your psychological health, which includes things like your self-confidence, feelings towards sex and mental health issues such as anxiety and depression. 

Third, there are your choices and habits, from the specific foods you eat to your level of activity and use of alcohol, tobacco and illicit drugs.

Finally, when lifestyle changes alone aren’t enough, there are science-based medications that can help you to deal with ED. 

Since no two people are the same, your path to better sexual performance and better erections could involve making changes to one, two, three or all four of these things.

If you’re interested in taking action against ED, you can view our range of erectile dysfunction treatments online. 

You can also learn more about dealing with ED in our guide to erectile dysfunction, which goes over common causes, risk factors and treatment options for ED. 

23 Sources

Hims & Hers has strict sourcing guidelines to ensure our content is accurate and current. We rely on peer-reviewed studies, academic research institutions, and medical associations. We strive to use primary sources and refrain from using tertiary references.

  1. Lakin, M. & Wood, H. (2018, June). Erectile Dysfunction. Retrieved from
  2. -What is Cortisol? (2018, November). Retrieved from
  3. -Yafi, F.A., et al. (2016). Erectile dysfunction. Nature Reviews Disease Primers. 2, 16003. Retrieved from
  4. -Bodenmann, G., Atkins, D.C., Schär, M. & Poffet, V. (2010, June). The association between daily stress and sexual activity. Journal of Family Psychology. 24 (3), 271-9. Retrieved from
  5. Manage Stress. (2021, June 10). Retrieved from
  6. Kühn, S. & Gallinat, J. (2014, July). Brain Structure and Functional Connectivity Associated With Pornography Consumption. JAMA Psychiatry. 71 (7), 827-834. Retrieved from
  7. -Wéry, A. & Billieux, J. (2016, March). Online sexual activities: An exploratory study of problematic and non-problematic usage patterns in a sample of men. Computers in Human Behavior. 56, 257-266. Retrieved from
  8. Erection Ejaculation: How It Occurs. (2020, November 27). Retrieved from
  9. Josefsson, et al. (2018, June). Physical Activity to Improve Erectile Function: A Systematic Review of Intervention Studies. Sexual Medicine. 6 (2), 75–89. Retrieved from
  10. Beating high blood pressure with food. (2019, August 23). Retrieved from
  11. Arackal, B.S. & Benegal, V. (2007, April-June). Prevalence of sexual dysfunction in male subjects with alcohol dependence. Indian Journal of Psychiatry. 49 (2), 109–112. Retrieved from
  12. Benowitz, N.L. & Burbank, A.D. (2016, August). Cardiovascular Toxicity of Nicotine: Implications for Electronic Cigarette Use. Trends in Cardiovascular Medicine. 26 (6), 515–523. Retrieved from
  13. Tsujimura, A., et al. (2017, June). Atherosclerosis is associated with erectile function and lower urinary tract symptoms, especially nocturia, in middle-aged men. Prostate International. 5 (2), 65–69. Retrieved from
  14. Data and Statistics. (2017, May 2). Retrieved from
  15. Atkins, et al. (2010, June). The association between daily stress and sexual activity. Journal of Family Psychology. 24 (3), 271-9. Retrieved from
  16. Leproult, R. & Van Cauter, E. (2011, June 1). Effect of 1 Week of Sleep Restriction on Testosterone Levels in Young Healthy Men. JAMA. 305 (21), 2173–2174. Retrieved from
  17. Bogdański, et al. (2014, February). Obesity--significant risk factor for erectile dysfunction in men. Polski Merkuriusz Lekarski. 36 (212), 137-41. Retrieved from
  18. VIAGRA® (sildenafil citrate) tablets, for oral use. (2014, March). Retrieved from
  19. CIALIS (tadalafil) tablets, for oral use. (2011, October). Retrieved from
  20. LEVITRA (vardenafil hydrochloride) tablets, for oral use. (2014, April). Retrieved from
  21. STENDRA® (avanafil) tablets, for oral use. (2018, August). Retrieved from
  22. Park, H.J., et al. (2017, June). A Randomized, Placebo-Controlled, Double-Blind, Multi-Center Therapeutic Confirmatory Study to Evaluate the Safety and Efficacy of Avanafil in Korean Patients with Erectile Dysfunction. Journal of Korean Medical Science. 32 (6), 1016–1023. Retrieved from
  23. Atan, A., et al. (2006, February). Comparison of efficacy of sildenafil-only, sildenafil plus topical EMLA cream, and topical EMLA-cream-only in treatment of premature ejaculation. Urology. 67 (2), 388-91. Retrieved from

This article is for informational purposes only and does not constitute medical advice. The information contained herein is not a substitute for and should never be relied upon for professional medical advice. Always talk to your doctor about the risks and benefits of any treatment. Learn more about our editorial standards here.