The liver is the main organ of the body that makes cholesterol. Your body needs cholesterol to perform many biological functions, such as making hormones (like estrogen or testosterone) and providing structure to cells. In fact, your liver makes most of the cholesterol your body needs on a daily basis. But having too much of certain types of cholesterol is not healthy.

Cholesterol levels can also be affected by outside factors—including your diet and certain lifestyle factors.

Although there are different types of cholesterol, there are two main types of cholesterol that are commonly considered when assessing your risk for cardiovascular disease:

Low-density lipoprotein (LDL) cholesterol is considered unhealthy High-density lipoprotein (HDL) cholesterol is considered healthy

Studies have shown that high LDL cholesterol and low HDL cholesterol could raise your risk of developing cardiovascular disease if it’s not treated.

There are also some contributing factors you may have no control over. In these cases, there are cholesterol-lowering medications your healthcare provider can prescribe that can bring your cholesterol levels back within a healthy range.

The following factors could adversely affect your cholesterol levels.

You Aren’t Eating Healthy

A diet that is high in saturated fat, trans fat, and/or refined sugars can adversely affect your cholesterol levels by causing your LDL cholesterol levels to increase and your HDL cholesterol levels to decrease.

The American Heart Association recommends that only about 5% to 6% of your daily calories should come from saturated fat. Refined sugars and trans fats—which are introduced into various foods, including cookies, cakes, and chips—should be limited or avoided entirely.

You Don’t Have Certain Medical Conditions Under Control

Some medical conditions may also adversely affect your LDL, HDL, and total cholesterol levels, especially if you don’t get adequate treatment.

These conditions include:

Diabetes, prediabetes, insulin resistance, or metabolic syndrome Obesity Hypothyroidism Kidney disease

In most cases, addressing these underlying medical conditions will bring your cholesterol levels back within healthy levels.

Your Medications Are Increasing Your Cholesterol

Some of the medications that you are taking for other medical conditions may also cause a slight elevation in your LDL cholesterol levels. These include medications like thiazide diuretics (used to remove excess fluid from the body), estrogen and progesterone (used in hormone replacement therapy), atypical antipsychotics, beta-blockers, and certain HIV medicines. In some cases, this elevation is only temporary.

Your healthcare provider will monitor your lipid profile if you taking a medication that could adversely affect your cholesterol level.

You’ve Developed Some Unhealthy Habits

There are other things that you might be doing in your everyday life that could be causing your cholesterol levels to be too high. Certain lifestyle factors that could be sabotaging your cholesterol levels include:

Not getting enough exercise Not getting enough sleep Smoking cigarettes Living or working in a high-stress environment

These lifestyle habits could cause your LDL cholesterol levels to increase to some degree and in some cases also lower HDL cholesterol. Making positive changes in your lifestyle by eliminating these unhealthy habits could improve your lipid profile and your heart health.

It’s In Your Genes

Increased LDL cholesterol, decreased HDL cholesterol, or a combination of both may also be inherited from one or both of your parents. Early-onset cholesterol diseases have been linked to mutations in several genes. The most common cause is a mutation in the gene that encodes the LDL receptor (LDLR). Other culprits are mutations that affect the genes for apolipoprotein B (APOB), proprotein convertase subtilisin/kexin type 9 (PCSK9), and LDL receptor adaptor protein 1 (LDLRAP1).

If you have a family history of high cholesterol or cardiovascular disease, you should disclose this to your healthcare provider. They can periodically monitor you to detect any changes in your cholesterol levels so you can start treatment early and prevent the effects of high cholesterol.