Vitamin D or sunshine vitamin - How much sunshine should I get to produce it?

Have you had a blood test and it showed that you have a vitamin D or sunshine vitamin deficiency?Don't worry, you are not alone in this situation. It is estimated that worldwide there is a vitamin D deficiency of approximately 50% of the population between 18 and 60 years old and can reach up to 87% of people over 60 years of age. 

This makes us think, Do we need more sun to generate more vitamin D? Or perhaps the vitamin D levels established by laboratories are unrealistic?

Vitamin D is also known as the sunshine vitamin. Its main function is to promote the absorption of calcium and phosphorus from our diet and thus maintain a healthy bone structure. In humans, 80% of vitamin D is synthesized in the presence of the sun's ultraviolet rays; for the rest, we rely on diet and, nowadays, on supplements.

Women eating fatty fish, vitamin D, cheese, and sunbathing

In this article I will answer, from a dermatologist's point of view, the most frequent questions I receive about vitamin D in my practice. In addition, I have invited two referents and expert doctors on the subject who will help me answer some key questions.

What will I talk about in this article?

What is vitamin D?

Molecular composition of vitamin D or sunshine vitamin

Despite its name, the "vitamin" D is actually a hormoneand very powerful. Vitamin D is a pluripotent hormone and is aeceptors for this vitamin can be found in almost all cells and tissues of the human body, where it is responsible for regulating up to 200 genes. 

The reason you may have heard this vitamin referred to as the "sunshine vitamin" is because it is synthesized mainly from cholesterol when the skin is exposed to sunlight.  

Vitamin D is a hormone produced primarily by the skin and activated in the kidneys. This "sunshine vitamin" helps control the concentration of calcium in the blood and is vital for the development of strong bones.

What are the main functions of vitamin D?

Active vitamin D helps increase the amount of calcium that the intestine can absorb from food ingested into the bloodstream and also prevents calcium loss in the kidneys. Vitamin D modifies bone cell activity and is important for new bone formation in children and adults. 

Therefore its deficit is related to:

  • Osteomalacia (adults): Higher doses of vitamin D may help prevent osteoporosis, falls and fractures in older adults.
  • Rickets (children):  Vitamin D deficiency in children is characterized by stunted growth and soft, weak, deformed long bones that bend and bow under their weight as children begin to walk. 
Normal bone vs. osteoporotic bone

In addition, vitamin D deficiency has been linked to a number of health benefits, pointing to a wide range of functions in which it may be involved. However, the studies that inform us of the benefits of vitamin D still need to be interpreted with caution, as the benefits are not fully demonstrated. 

For example, it has an important role in the prevention of different diseases, such as:

  • Infection prevention: There are studies that have linked vitamin D deficiency to a more severe picture of respiratory infections and even Covid19, due to the role it plays in the proper functioning of the immune system. (12, 3)
  • Cancer prevention: Vitamin D may help prevent cancer. One study noted that 1,100 IU a day, along with calcium, reduced the risk of cancer in a significant percentage of patients. (12)
  • Metabolic diseases: It plays an indirect, but important, role in carbohydrate and lipid metabolism, as reflected by its association with type 2 diabetes, metabolic syndrome, insulin secretion, insulin resistance, polycystic ovary syndrome and obesity. (1)
  • Cardiovascular risk:  This includes endothelial cell dysfunctions, thereby accelerating the process of atherosclerosis, hypertension, or abnormal clotting, ultimately resulting in an increased risk of all cardiovascular events. (1
  • Dementia: Vitamin D deficiency increases the risk of developing dementia. (1 ,2)
  • Chronic pain:  Different studies have shown that vitamin D deficiency may be related to chronic pain. (12)
Surely vitamin D plays a role in many more biological processes that are still unknown. To date, scientific and epidemiological studies are lacking to be able to consolidate the information from initial studies and establish all the postulated benefits of vitamin D. 

How do we get the vitamin from the sun?

Vitamin D can be obtained from:

  • Sun exposure
  • Foods containing vitamin D
  • Supplements 

With the exception of fatty fish livers, very few foods contain vitamin D naturally, and the main source of vitamin D comes from exposure of the skin to sunlight through ultraviolet B (UVB) rays.

Metabolic and enzymatic pathways for the formation of vitamin D or sunshine vitamin
image adapted from

The liver and kidneys convert vitamin D (produced in the skin and absorbed in the diet), into the active hormone, which is called calcitriol or 1,25(OH)2D. This is the active, steroid-hormonal form of vitamin D. 

Calcitriol interacts with the vitamin D receptor, which is found on almost every cell in the body. When the active form of vitamin D binds to this receptor, it activates or deactivates genes, causing changes in the cells. This explains why vitamin D has so many functions in our body. 

Why does vitamin D deficiency occur?

Vitamin D deficiency can be caused by different reasons:

  • Not getting enough vitamin D in the diet or through supplements
  • Not absorbing enough vitamin D in the digestive tract. As can happen with some conditions such as celiac disease, inflammatory bowel disease and after bariatric surgeries, among others. 
  • Problems producing vitamin D from exposure of the skin to sunlight
  • Problems with the conversion process of vitamin D into its active form (calcitriol). As in patients with hepatic and renal diseases.

Vitamin D and the sun

However, as dermatologist with expertise in skin cancer I am always very concerned about explaining to my patients the importance of responsible sunbathing. This way you can get the benefits of vitamin D, but not increase the risk of skin cancer or premature skin aging. 

It is very striking to me during my consultation that my patients believe that they need many hours of sun exposure to have an adequate production of vitamin D, but now we will see that this is not the case and that more hours in the sun does not necessarily mean more vitamin D

What type of light do I need to generate the vitamin from the sun?

Vitamin D3 is produced photochemically from 7-dehydrocholesterol in the skin through exposure to the sun, specifically by the ultraviolet radiation type B (UVB). The amount of UVB synthesized follows a daily cycle with a higher intensity at midday and a significant decrease at the beginning and end of the day. 

Therefore, in Spain, the effective biological radiation to achieve optimal vitamin D levels occurs in the central hours of the day, which is also the radiation that produces the most erythema. In addition, this type of solar radiation is also the one that contributes the most to the development of skin cancerIt is therefore very important to know how long we should be exposed to it.

On the other hand, it is important to know that the exposure to light through the windows is insufficient because the glass almost completely blocks UVB light. 

Finally, it is important to know that tanning beds (UVA rays) play no role in vitamin D production. UVB rays synthesize this vitamin. 

How long do I need to expose myself to the sun?

The dose of UVB reaching the body surface area (BSA) required to maintain an optimal vitamin D status is not definitively known. low doses of UVB rays

The skin reaches an equilibrium in which vitamin D is degraded as fast as it is created. As a result, the skin reaches an equilibrium in which vitamin D is degraded as fast as it is created. more sun exposure does not mean that you will produce more vitamin D.

Adequate amounts of vitamin D can be produced with moderate sun exposure on the face, arms and legs (for those with lighter skin, i.e. skin phototypes II or III).  

Now, the necessary sun exposure will vary throughout the year and also according to the time of day. to which we expose ourselves. That is why the Spanish Photobiology Group of the AEDV I have developed the following table in order to have a general idea of the necessary minutes of sun exposure in Spain needed to obtain the sufficient amount of vitamin D. 

Necessary minutes of sun exposure to produce vitamin D


Time zone  Vitamin D (skin phototype II-III)
  Winter  Spring  Summer  Autumn 
10-11 hours 82 min 44 min 26 min 44 min
12-15 hours  22 min  12 min 7 min  12 min 
16-18 hours  79 min 43 min 25 min  43 min 

Minutes of sun exposure required according to the UV index

Another slightly more sophisticated method to find out how long I have to expose myself to the sun is using the UV index. Ehe UV index describes the amount of UV rays reaching the earth's surface (the higher the index, the greater the exposure). In this way we know that more vitamin D is generated in less time in areas where the UV index is higher.

diagram showing the amount of UV radiation from the sun
  • UV index greater than or equal to 3: adequate vitamin D levels are achieved incidentally by going outdoors (only a few minutes in the fresh air each weekday).
  • UV index less than 3: Many guides recommend spending between 5-30 minutes outdoors between 11 AM and 3 PM. Only partial skin uncovering (hands, face, arms) should be done at least 3 times per week. 
Where do I check the UV index?

Nowadays we find this information very easy. In the mobile weather app on any iphone or Android you can see in real time how the UV index changes during the day. 

Best method - AEDV UV-Derma Application

Possibly the best and most effective method is to download the UV derma app from the Spanish Academy of Dermatology. The 'UV-Derma' App offers practical information for the general population, with the aim of contributing to the development of a dermo-healthy activity.

UV derma app from the AEDV to find out how many minutes of sunlight are necessary to produce vitamin D.

Real-time application

One of the initiatives that has been launched is 'UV-DERMA: Photoprotection on your Smartphone', an application that aims to promote healthy habits against the harmful effects caused by excessive sun exposure. 

One of the advantages of this application is that we can know the IV index (Intensity of the sun) and also the minutes of sun exposure we need to get vitamin D. 

What are the dangers of too much sunbathing?

Although sunlight is the main factor for the production of vitamin D, too much of it can be dangerous. Here are the main dangers of too much sun. 

  • Skin cancer: Excessive UV light is one of the main causes of the causes of skin cancers. Therefore, we should not abuse the sun with the excuse of having more vitamin D. 
  • Premature skin aging: Spending too much time in the sun can cause skin to age faster. Some people develop wrinkled, thinner and more sensitive skin.
  • Sunburn: The most common immediate harmful effect of excessive sunlight. Symptoms of sunburn include redness, swelling, pain or tenderness and blisters. 
  • Eye damage: Prolonged exposure to UV light can damage the retina. This can increase the risk of eye diseases such as cataracts. 
  • Heat stroke: Also known as heat stroke, it is a condition in which the body's core temperature may rise due to excessive heat or sun exposure. 

What do the international dermatology societies say?

International scientific societies have an important position on sun exposure for vitamin D production: 

Spanish Academy of Dermatology

Logo of the Spanish Academy of Dermatology

"It should be noted that it is highly recommended that the photoprotection in times of high solar ultraviolet incidenceThe doses of UV needed to produce vitamin D are low and can be achieved by simply walking around exposing small areas of the body such as the face and hands to the sun".

American Academy of Dermatology

American academy of Dermatology logo

"Because ultraviolet rays from the sun and tanning booths can cause skin cancer, the American Academy of Dermatology does not recommend getting vitamin D from sun exposure or indoor tanning."

How to obtain vitamin D from the diet?

In order to answer this question I have contacted a great friend and super nutrition specialist. Dr. Escaffi will give us her expert view and also what foods to implement in our diet to get more vitamin D. 

Dr. María José Escaffi

Internal Medicine, Mg Nutrition, MBA
Clínica las Condes, Chile
Dr. María José Escaffi talking about diet in vitamin D or sunshine vitamin deficiency.

Vitamin D is produced primarily in the skin in response to sunlight and is also absorbed from ingested food. About 10-20% of vitamin D is absorbed in this way, as part of a healthy, balanced diet. 

The recommended daily intake of vitamin D is as follows:

  • 400 IU (10 mcg): infants, 0-12 months
  • 600 IU (15 mcg): children and adults from 1 to 70 years old
  • 800 IU (20 mcg): older adults and pregnant or breastfeeding women

There are also two forms of vitamin D in the diet, the vitamin D3 (cholecalciferol) that found in oily fish, fish liver oil, and egg yolks, and la vitamin D2 (ergocalciferol), of vegetable origin, that is found in some mushrooms and other foods. 

The vitamin D3 is the most potent of the two types, and raises blood levels of vitamin D almost twice as much as D2. Excess vitamin D is stored in body fat for later use. To improve the deficit of this hormone it is very important to consume foods rich in vitamin D, among which are included:
Food UI/ration
Cod liver oil (5ml) 600-1.360
Salmon (100g) 360
Mackerel (100g) 345
Sun-dried mushrooms 1.600
Fresh mushrooms (100g) 100
Sardines in oil (100g) 500
Tuna in oil (100g) 238
Milk (250ml) 115-124
Orange juice (250ml) 100
Yogurt (1,5l) 80
Margarine (5ml) 60
Cereals (250ml) 40-100
Eggs (one) 25
Cheese (28g) 6-12

Vitamin D is also added to all infant formula milk products, as well as some breakfast cereals, fat spreads and non-dairy milk alternatives. The amounts added to these products may vary and may be added only in small amounts. Manufacturers are required by law to add vitamin D to infant formula.

Foods rich in vitamin D that supplement the vitamin from the sun

By combining responsible sun exposure with these vitamin D-rich foods, you'll be sure to get all the benefits of vitamin D.

Due to this pandemic of vitamin D deficiency, several programs are being worked on worldwide to supplement with this vitamin products of high consumption in our population (such as bread or dairy products) and thus overcome this massive deficiency in our population.

When should I take vitamin D supplements?

Vitamin D supplements are widely used nowadays and can generate doubts about when it is necessary to take them and what are the necessary doses. I have contacted my other great friend and colleague at the Hospital Clínic de Barcelona, Dr. Helena Florez, who will give us her expert view on this subject. 

Dr. Helena Florez Enrich

Rheumatologist, MD, PhD
Hospital Clínic de Barcelona
Dr. Helena Florez Rheumatologist expert in osteoporosis

Although vitamin D deficiency is an endemic problem that affects a large part of the population, vitamin D supplementation is only indicated for certain risk groups.

In Spain, despite having a climate conducive to cutaneous vitamin D synthesis, the levels of this vitamin are similar to or even lower than those described in central Europe or Nordic countries. This could be explained, in part, by the low dietary intake of vitamin D, which is not compensated by cutaneous synthesis. It is for these reasons that in some conditions different scientific societies recommend supplementation for vitamin D deficiency. 

Open bottle with vitamin D tablets

In spite of this, the public health measures advised by different scientific societies are as follows:

1) Do not prescribe vitamin D supplementation in the general population, as treating asymptomatic subjects not belonging to risk groups has not been shown to improve health.

2) Supplement only high-risk population groups, which are:

  • Institutionalized patients and/or elderly people living in nursing homes
  • Patients at high risk of falls, osteoporosis and/or with fragility fractures.
  • Patients with prolonged immobilization
  • Patients with gastrointestinal malabsorption (due to bariatric surgery, inflammatory bowel disease, gluten intolerance or lactose intolerance, among others).
  • Subjects with little or no sun exposure due to cultural reasons, medical prescription (patients with cancer or certain skin diseases) or others.
  • Patients with darker complexions (African, Central American and Southeast Asian individuals).
  • Pregnant women, as maternal vitamin D deficiency is a risk factor for infantile rickets (more frequent in immigrants with dark pigmentation).
  • Exclusively breastfed infants under 1 year of age and all children between 1 and 4 years of age
  • Children and adults with obesity (BMI >30) 

Conclusions on vitamin D and the sun

Vitamin D is an essential nutrient and its deficiency is very common in the general population. 

Vitamin D is a fat-soluble vitamin important for bone health.

Vitamin D is produced by the skin when exposed to sunlight, which is why it is known as the sunshine vitamin. Foods such as fatty fish, fish oil and liver also contain vitamin D, as do certain fortified foods and supplements.

Attributions and bibliography

Share this article

Notify of
Inline Feedbacks
Mira todos los comentarios
Sebastian Podlipnik - Skin cancer

Sebastian Podlipnik

Dermatology Blog

I am a dermatologist and cum laude MD and author of multiple research studies. I specialize in skin cancer, laser technologies and cosmetic dermatology. The intention of this blog is to bring you closer to topics of interest in dermatology and research.

My favorites
Read my book

And get exclusive and quality information for my readers.

This website uses cookies to ensure the best experience, personalizing content and ads, providing social media features and analyzing traffic. More information about cookies and privacy policy.