Chest pain that comes and goes may be related to the heart, the muscles, the digestive system, or psychological factors. Possible causes include gastrointestinal problems, panic attacks, angina, heart attack, and more.

Underlying causes of chest pain may be mild, as in the case of acid reflux. However, it may indicate a heart attack or other serious condition. It is important to recognize warning signs and look for accompanying symptoms.

This article explores the possible causes of chest pain that comes and goes. It also describes how to tell when the pain is heart-related, and when to contact a doctor.

A person has their hands on their chest.Share on Pinterest
PeopleImages/Getty Images

Pain in the chest that comes and goes may signal a problem with the heart, respiratory system, or digestion. Also, in some people, it occurs during panic attacks.

There is no way to accurately self-diagnose chest pain based on symptoms alone. A person should contact a doctor if chest pain keeps coming back, gets worse, or accompanies other symptoms.

Pain that lasts for weeks or months is unlikely to be caused by a life-threatening emergency. The issue is more likely related to the muscles or skeletal structure.

Chest pain due to a heart attack is a medical emergency. It can cause symptoms such as:

  • sudden pain in the center of the chest
  • a feeling of pressure or fullness in the chest
  • pain that lasts longer than a few minutes
  • pain that radiates to the neck, shoulder, arm, back, or jaw
  • nausea
  • dizziness
  • breathing difficulties
  • excessive sweating

Many types of chest pain come and go. Even the pain of a heart attack may temporarily get better, then return.

To better understand the cause of chest pain, look carefully for other symptoms, and keep in mind any risk factors for medical conditions.

Below are some possible causes of chest pain.

Heart attack

Sudden, intense pain in the chest may indicate a heart attack or cardiac arrest. These result when faulty electrical impulses or blockages stop blood from reaching the heart.

Warning signs of a heart attack include:

  • pain in the center of the chest
  • a feeling of crushing pressure on the chest
  • pain that lasts longer than a few minutes
  • pain that radiates to the shoulder, neck, arms, back, or jaw
  • nausea, dizziness, or shortness of breath
  • excessive sweating

Symptoms may differ, based on sex. People assigned female at birth are more likely than people assigned male at birth to also experience:

  • nausea
  • dizziness
  • shortness of breath
  • back or jaw pain

A heart attack is a medical emergency. If a person suspects that they are having one, or if they experience any new, unexplained chest pain, they should contact emergency services right away.

Certain factors can increase a person’s risk of heart attack. These include:

  • CHD
  • history of heart attacks
  • obesity
  • diabetes

Learn more about how to spot and treat a heart attack.


Angina is pain or discomfort in the chest that occurs when the heart does not get enough blood. People with angina may feel tension, pressure, or a squeezing sensation in the chest. The pain may also radiate to the jaw.

The pain of angina is similar to that of a heart attack, and angina is a risk factor for the condition.

Angina can be a symptom of coronary heart disease (CHD), which occurs when the arteries become clogged. CHD is also a risk factor for a heart attack. Anyone who suspects that they have it should contact a doctor as soon as possible.

Learn more about angina.

Gastrointestinal problems

A wide variety of gastrointestinal problems can lead to pain in the chest or near the ribs. For example:

  • Acid reflux can cause a burning sensation in the chest.
  • Gallstones can cause sudden, intense pain that lasts 1–5 hours, disappears, and returns.
  • Ulcers can cause pain that comes and goes.

When a person has acid reflux, chest pain tends to be more intense shortly after a meal. Also, it may be worse after consuming alcohol or fatty foods.

If a person suspects that chest pain is related to a stomach or liver issue, it is important to see a doctor. However, this type of pain does not usually signal an emergency.

Muscle pain

Muscle pain caused by tension, an injury, or a chronic pain syndrome often underlies chest pain.

Symptoms of muscle pain vary greatly. The pain may be:

  • sharp or dull
  • shooting or throbbing
  • radiating outward or concentrated in one spot

Chest pain is more likely to be muscle-related if it:

  • gets better with massage
  • gets worse when a person inhales sharply and suddenly
  • feels similar to muscle pain experienced in the past
  • reproduced with pushing on the area

Panic attack

Chest pain can be a frightening symptom of a panic attack, and it may make a person feel more anxious. The pain can be similar to that of a heart attack.

Other symptoms a person may experience during a panic attack include:

  • trembling
  • breathing difficulties
  • dizziness
  • sweating
  • chills
  • tingling or numbness in the hands
  • nausea
  • stomach pain

These attacks can go away with slow, deep breathing. In some cases, they may last for only a few minutes, though they may last up to 30 minutes or more.

If the pain does not go away, it can be difficult to distinguish a panic attack from a heart attack without the help of a doctor.

Learn about how to stop a panic attack.

Lung issues

Problems with the lungs can lead to chest pain.

Chest pain due to lung issues may:

  • feel sharp
  • worsen when breathing in and out
  • happen alongside symptoms such as breathing difficulties and coughing

Experiencing intense, lung-related chest pain is a medical emergency. It is best to seek immediate medical advice if a person is concerned about chest pain related to the lungs.

Respiratory infection

Respiratory infections can cause chest pain.

Some people develop a condition called pleurisy following a respiratory infection. Pleurisy is inflammation of the pleura, which is the tissue that wraps around the outside of the lungs.

It is best to contact a doctor if chest or lung pain lingers after a respiratory infection.


Mastitis refers to an infection in breast tissue. Mastitis can be intensely painful. A person may experience:

  • swelling
  • shooting or sharp pains in the breasts or chest
  • fever

Mastitis is common during breastfeeding due to the buildup of milk. The infection may clear up on its own, though some people require antibiotics.

Learn more about mastitis.


As well as mastitis, there are other possible causes of chest pain when breastfeeding or nursing. It can lead to pain in the chest and around the breasts.

This can happen due to:

  • enlargement of the breasts
  • too much breast milk
  • blocked milk ducts
  • breast abscess
  • thrush

A person’s doctor can help determine the cause of the pain and advise on any necessary treatments.

Pulmonary embolism

A pulmonary embolism is a blockage in a blood vessel that leads to the lungs. An embolism occurs when a blood clot has broken loose, often from the legs. If a person has a blood clot in a leg, they may experience pain in the area.

Pulmonary embolisms can also result in intense chest pain and shortness of breath. They are life-threatening medical emergencies.

Other symptoms can include:

  • dizziness
  • back pain
  • excessive sweating
  • bluish nails or lips

Chest pain should be evaluated by a physician. It is not always possible to self-diagnose the cause based on symptoms alone.

Chest pain is more likely to be heart-related if a person has:

  • cardiovascular risk factors
  • a history of heart disease
  • shortness of breath
  • pain that does not improve with medication
  • pain that gets worse over time

Heart problems are less likely to cause pain that:

  • lasts for only a few moments
  • is relieved by taking medication
  • goes away when taking a deep breath
  • is relieved when the area of the chest is massaged

A doctor should evaluate any recurring chest pain. If the pain keeps coming back or gets worse, it is important to contact a doctor as early as possible.

Seek emergency medical care if the pain is:

  • intense and does not go away
  • getting gradually worse
  • accompanied by dizziness, trouble breathing, or shortness of breath
  • accompanied by a squeezing or crushing sensation in the center of the chest
  • lasting for more than a few minutes

The following are commonly asked questions about chest pain that comes and goes.

Does heart attack pain come and go over days?

Heart attack chest pain usually persists for longer than a few minutes. They can also go away and come back again intermittently over the course of several hours.

If a person experiences new or worsening chest pain, they should contact a doctor immediately.

What are the four signs of an impending heart attack?

There are five warning signs of a heart attack, according to the American Heart Association. These include:

  • pain or chest discomfort
  • lightheadedness, nausea, or vomiting
  • jaw, neck, or back pain
  • discomfort or pain in the shoulder or arm
  • shortness of breath

How can a person rule out a heart attack at home?

It is important for a person to be aware of the symptoms of a heart attack. A person should not attempt to rule our a heart attack at home. Instead, a person should contact a doctor if they suspect they are experiencing heart attack symptoms.

What are the symptoms of a mini heart attack?

Symptoms of a “mini” heart attack resemble the symptoms of a regular heart attack. A person may experience:

  • pressure-like chest pain
  • pain that radiates to the arm, neck, or jaw
  • shortness of breath
  • nausea and vomiting
  • fatigue
  • sweating
  • fainting

People should contact a doctor if they suspect they are experiencing “mini” heart attack symptoms.

Chest pain that comes and goes can be due to numerous possible conditions. Some conditions, such as heart attack, require immediate medical attention.

Other possible causes include gastrointestinal problems, muscle pain, lung issues, mastitis, and angina. It can also be the result of breastfeeding, pulmonary embolism, or a panic attack.

It is best to contact a doctor if there are concerns about recurring or worsening chest pain. A person should seek immediate medical help if they experience symptoms of a heart attack.

Read the article in Spanish.