Map from Google - Madagascar

Madagascar is a large island in the Indian Ocean, and has a tropical climate, rainy along the east coast, arid in the south-west and temperate in the mountains. In inland areas, mountain ranges mitigate the climate, while the rains vary depending on slope exposure. Being in the Southern Hemisphere, the country has reversed seasons compared with Europe or North America.
The whole country has a rainy season from November to March, though it produces little effects in the southwest, which therefore is arid, and in most of the country there is a dry season from April to October (or from May to September in the north), except on the east coast where it rains all year round. As is typical of the Tropics, the rains usually occur in the form of thunderstorms, especially in the afternoon, so there's no shortage of sunshine even in the wettest months, at least in the morning hours.
Here are the climatic zones of Madagascar.

Climates in Madagascar

During winter, the south-east trade winds prevail, and they are cool and dry everywhere except along the east coast, where they release the moisture that they have previously picked up over the ocean. For this reason, on the east coast and on the first slopes near the coast, it rains throughout the year, and a tropical forest flourishes.
In Toamasina (formerly Tamatave), 3,350 millimetres (132 inches) of rain per year fall. In March, the rainiest month, rainfall exceeds 400 mm (16 in). The only months when the rains become not too heavy goes from September to November, and this is true in general for the entire east coast. Between June and September, the whales that congregate in the channel between the island of Sainte-Marie and the coast of Madagascar for breeding, are observed in an often rainy context.
Here is the average precipitation of Toamasina.
Average precipitation - Toamasina
Prec. (mm)4103804803252302602902201201351703553370

And here are the average temperatures of Toamasina. You can notice the cooling during the austral winter: in July and August, the daily average is 21 °C (70 °F).
Average temperatures - Toamasina
Min (°C)232322212018171717192022
Max (°C)303030292726252526272829
Min (°F)737372706864636363666872
Max (°F)868686848179777779818284

On the east coast the sun never shines very often, since the rains are frequent all year round, however the sunniest period is that of winter, from May to August, when the trade winds directly hit the coast, while the relatively sunniest months are October and November.
Sunshine - Toamasina
Sun (hours)776765567887

The temperature of the sea on the east coast is high enough for swimming all year round, although it decreases a bit from July to October, as we can see in the following table.
Sea temperature - Toamasina
Sea (°C)282828282726252424252627
Sea (°F)828282828179777575777981

The cool trade winds have a smaller effect on the north-western coast (see Nosy-Be), which therefore is warmer in winter.
Average temperatures - Nosy Be
Nosy BeJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)232323222019181819202223
Max (°C)313131313129292931323231
Min (°F)737373726866646466687273
Max (°F)888888888884848488909088

The period from November to March not only is rainy, but also is hot and muggy. We are in the austral summer, and in this season the country is divided into two: in the north, the north-west monsoon prevails, bringing heavy rains along the north-west coast, where rainfall goes from 400 to 500 mm (16 to 20 in) per month in January and February. Here is the average rainfall of Nosy-Be, which being on the northwest coast is directly exposed to the northwest monsoon.
Average precipitation - Nosy Be
Nosy BeJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)4654252851406050354040951903602185

In Nosy Be the sun shines very often in the dry period, from May to October. On average there are almost 3,000 hours of sunshine a year.
Sunshine - Nosy Be
Nosy BeJanFebMarAprMayJunJulAugSepOctNovDec
Sun (hours)667898999987

In this part of the coast, the sea temperature is high throughout the year, as we can see in the following table.
Sea temperature - Nosy Be
Nosy BeJanFebMarAprMayJunJulAugSepOctNovDec
Sea (°C)292929292827262626262828
Sea (°F)848484848281797979798282

In the austral summer, in the south of the country the south-east trade winds still blow, bringing rains along the eastern side, but much less intense in the south-west. In Toliara (formerly Tulear), just 420 mm (16.5 in) of rain per year fall, with a maximum of around 90 mm (3.5 in) per month from December to February. Here is the average precipitation.
Average precipitation - Toliara
Prec. (mm)959035201515668122095420

In the southwest, the hottest area of the country, the temperature can reach 40 °C (104 °F) from December to March. Here the amount of sunshine remains very good even in summer. Here are the average temperatures in Toliara.
Average temperatures - Toliara
Min (°C)232322201715141516192022
Max (°C)323232312927272829293031
Min (°F)737372686359575961666872
Max (°F)909090888481818284848688

In Toliara, the sun shines regularly throughout the year: there are even 3,600 hours of sunshine a year.
Sunshine - Toliara
Sun (hours)10101010109101010101110

The temperature of the sea in the southern part of the coast touches 23 °C (73 °F) in August, therefore it remains warm enough for swimming even in the winter season.
Sea temperature - Toliara
Sea (°C)282928272624242324252627
Sea (°F)828482817975757375777981

The west coast is less rainy than the north-west coast, so that rainfall hovers between 700 and 1,000 mm (27 and 40 in) per year, compared with 1,500/2,000 mm (60/80 in) in the northwest coast.
As mentioned, in the interior of the country the climate is tempered by altitude, at least at intermediate elevations, while above 2,000 metres (6,500 feet) during winter the temperature can drop below freezing (0 °C or 32 °F), especially in the south. In the dry season, on the plateau sometimes a wind that is able to raise the dust from the parched ground can blow.
The capital Antananarivo (formerly Tananarive) is located at 1,300 metres (4,300 feet) above sea level, and has a pleasant climate, in fact the average goes from 21 °C (70 °F) in the summer months, to 15 °C (59 °F) in July and August. Winter is therefore pretty cool. Here the best months are April, September and October.
Average temperatures - Antananarivo
Min (°C)171716151311101011131516
Max (°C)282625252321202123252626
Min (°F)636361595552505052555961
Max (°F)827977777370687073777979

Throughout the year, in Antananarivo 1,400 mm (55 in) of rain fall, most of which occur from November to March. Here is the average precipitation.
Average precipitation - Antananarivo
Prec. (mm)27025518550207101510651703051365

In Antananarivo the amount of sunshine is moderate, however it reaches its maximum from September to November.
Sunshine - Antananarivo
Sun (hours)766777788886

In the warm season, Madagascar may be affected by tropical cyclones, which can form in the South-West Indian Ocean from November to mid-May, although they are more likely from late December to mid-April.

The country is very interesting, not only for the beauty of the landscapes, but also for its flora and fauna, because it has a great biodiversity and several native species, having been separated from the African continent millions of years ago.

Baobabs in Madagascar

When to go

The best time to visit the entire Madagascar, to make excursions and to visit the various flora and fauna attractions, corresponds to the months of September and October: in this way you can avoid the heat, but also the rains and the possible cyclones of the austral summer, but also the night cold, which at high altitudes is more intense in winter, from June to August. However, the period from June to August can also be good, although it's very rainy on the east coast, and as we said it can be cold in mountain areas.
For a beach holiday, the west coast is preferable to the east coast, being sunnier and less rainy. Anyway, on the west coast you can go from mid-May to October, in the east coast in September and October. As regards the west coast, you can distinguish between the northern part, the one facing north-west, which is warm throughout the year (see Nosy-Be, Antsiranana), and the central-southern part, which in winter can sometimes be reached by cool air masses from the south and can experience cold nights (see Toliara): therefore, in the latter it's preferable to go in September and October, but if you intend to go in July or August, to avoid surprises you can choose the northernmost area. In Nosy-Be you can go from mid-May to October, although in October a little atmospheric instability begins to occur, with the first afternoon thunderstorms.

What to pack

In winter (June to August): on the south-central and eastern coast, spring/autumn clothes, light for the day, sweater and light jacket for the evening; on the east coast, add a raincoat or umbrella. On the north coast (Mahajanga, Nosy Be), light clothing, a sweatshirt for the evening, a scarf for the breeze. In Antananarivo and the plateau, spring/autumn clothes, jacket, sweater and hat for the evening, scarf for the wind.
For the reef, equipment for snorkeling, water shoes or rubber soled shoes.

In summer (December to February): throughout the coasts and inland areas at low altitude, light clothing made of natural fibres, sun hat, a light sweatshirt for the evening, light raincoat or umbrella. In Antananarivo and the plateau, light clothes for the day, sweatshirt and light jacket for the evening, raincoat or umbrella.