Experiencing chest pain can be frightening, particularly if you don’t know what’s causing it. What does it mean if the chest pain comes and goes?

There are many possible causes of chest pain. Some of them are serious while others aren’t. Nevertheless, any chest pain should always be taken seriously.

Below we’ll explore some of the possible causes of chest pain that comes and goes, how it’s diagnosed and treated, and when to see a doctor.

The potential causes of chest pain aren’t limited to your heart. They can include other parts of your body, such as your lungs and your digestive tract too. Here are some conditions may cause chest pain that comes and goes.

Heart attack

A heart attack happens when the flow of blood to your heart tissue is blocked. This can be due to plaque buildup or a blood clot.

Symptoms of a heart attack vary by individual. Pain may be felt as mild discomfort or could be sudden and sharp.

Angina

Angina happens when your heart tissue isn’t getting enough blood. It can be a common symptom of heart disease. It can also be an indicator that you’re at risk of having a heart attack.

Angina often, but not always, occurs while you’re exerting yourself. You may also feel pain in your arms or back.

Pericarditis

Pericarditis is the inflammation of the tissues that surround your heart. It can be caused by a variety of things, including infection, an autoimmune condition, or a heart attack.

Pain from pericarditis may come on suddenly and may also be felt in the shoulders. It tends to get worse when you breathe or lie down.

Gastroesophageal reflux disease (GERD)

GERD is a condition in which stomach acid moves up into the esophagus, causing a burning sensation in the chest called heartburn. Pain from GERD may feel worse after eating and while lying down.

Stomach ulcers

A stomach ulcer is a sore that forms on the lining of your stomach. They can occur due to a bacterial infection or due to use of nonsteroidal anti-inflammatory drugs (NSAIDs).

Stomach ulcers can cause pain anywhere between your breastbone and belly button. This pain may be worse on an empty stomach and may ease after eating.

Injury or strain

An injury or strain involving your chest may cause chest pain to occur. Injury can occur due to an accident or due to overuse.

Some possible causes include things like muscle strain or injured ribs. Pain may get worse when moving or stretching the affected area.

Pneumonia

Pneumonia causes inflammation of the air sacs within your lungs called alveoli. It’s caused by an infection.

Pain from pneumonia may get worse from coughing or breathing deeply. You may also experience fever, chills, and shortness of breath.

Pleurisy

Pleurisy occurs when the membranes that line your lungs within the chest cavity become swollen and inflamed. It can be caused by a variety of things, including infections, autoimmune conditions, or cancer.

Pain may feel worse when breathing deeply, coughing, or sneezing. You may also have a fever, shortness of breath, or chills.

Gallstones

Gallstones are when digestive fluid hardens inside your gallbladder, causing pain. You may feel gallstone pain in the right upper part of your abdomen, but it can also spread to the area of the shoulders or breastbone.

Panic attack

A panic attack can happen spontaneously or due to a stressful or frightening event. People having a panic attack may feel chest pain, which may be mistaken for a heart attack.

Costochondritis

Costochondritis is when the cartilage connecting your ribs to your breastbone becomes inflamed. It can be caused by an injury, infection, or arthritis.

Pain from costochondritis occurs on the left side of the breastbone and can get worse when you breathe in deeply or cough.

Pulmonary embolism

A pulmonary embolism happens when a blood clot that’s formed elsewhere in the body becomes lodged in the lungs. Pain can occur when breathing in deeply and may occur with shortness of breath and an increase in heart rate.

Pulmonary embolism is a medical emergency. If you think you’re experiencing these symptoms, seek immediate medical care.

Lung cancer

Chest pain is a common symptom of lung cancer. It’s often worse when coughing or breathing deeply. Other symptoms you may notice include things like a persistent cough, unexplained weight loss, and shortness of breath.

Is it a heart attack?

How can you tell if the pain you’re experiencing is a heart attack? In addition to chest pain, look for the following warning signs:

  • pain that spreads to the arms, neck, or back
  • shortness of breath
  • cold sweats
  • feeling unusually fatigued or tired
  • nausea or vomiting
  • being dizzy or lightheaded

If you have chest pain and any of these symptoms call 911 immediately.

You should always seek emergency medical attention if you’re experiencing unexplained chest pain or believe that you may be having a heart attack. If you are having a heart attack, prompt treatment can save your life.

In order to diagnose your chest pain, your doctor will first take your medical history, perform a physical examination, and ask about your symptoms.

In some cases, the location of the pain can help give an idea of the potential cause. For example, pain on your left side could be related to your heart, your left lung, or due to costochondritis. Pain on the right side may be due to gallstones or your right lung.

Examples of additional tests your doctor may use to make a diagnosis include:

  • blood tests, which can help to indicate a number of conditions, including heart attack, pulmonary embolism, or infection
  • imaging technology such as a chest x-ray, CT scan, or MRI scan to visualize the tissues and organs of your chest
  • electrocardiogram (ECG), to examine the electrical activity of your heart
  • coronary or pulmonary angiogram to see if arteries in your heart or lungs, respectively, have narrowed or become blocked
  • echocardiogram, which uses sound waves to make an image of your heart in action
  • stress testing, to see how your heart responds to stress or exertion
  • endoscopy, to check for issues in the esophagus or stomach that may be related to GERD or stomach ulcers
  • biopsy, which involves removing and examining a tissue sample

The way that chest pain is treated can depend on what’s causing it. Below are some examples of possible treatments:

Medications

Medications can be used to treat many different types of chest pain. Some examples include:

Procedures or surgeries

Sometimes one of the following procedures or surgeries may be necessary to treat your condition:

  • percutaneous coronary intervention (PCI) to help open arteries that have blocked or narrowed
  • heart bypass surgery, which grafts a healthy artery into your heart tissue in order to bypass a blocked artery
  • removing accumulated fluids, which may be necessary for conditions like pericarditis or pleurisy
  • catheter-assisted removal of a blood clot in the lung
  • removal of the gallbladder in people with recurrent gallstones

Lifestyle changes

These typically include things like dietary changes, increasing levels of physical activity, and quitting smoking.

Causes of chest pain can vary and as such, preventive measures can be diverse. Follow the tips below to help prevent some of the causes of chest pain:

If you have chest pain that comes and goes, you should be sure to see your doctor. It’s important that they evaluate and properly diagnose your condition so that you can receive treatment.

Remember that chest pain can also be a sign of a more serious condition like a heart attack. You should never hesitate to seek emergency medical attention for unexplained chest pain or if you think you’re having a heart attack.