Building shadow calculator – the shadow of a house on a map

Draw the outline of a building or pick it on the map, set its height, and the tool draws its shadow on the map for any date and time, the shadow at every full hour, and the hours of direct sun at a point such as your garden or balcony, also on 21 March, 21 June and 21 December. Shadows are accurate to the centimetre for a flat roof on level ground; trees, slopes and other buildings are not included. It runs in your browser and nothing is uploaded.

A click on the map

Zoom in close and click the corners of the building, or pick a building from the map. Then set its height.

    The files hold the buildings with their heights, the shadow at the chosen time, the hourly shadows and the point. Need a shapefile? Convert the GeoJSON to a shapefile on FileReshape.

    Map and data: OpenFreeMap, MapLibre GL JS, NOAA Solar Calculator formulas (after Jean Meeus, Astronomical Algorithms), timezone-boundary-builder (via geo-tz), IANA time zone database (tz database), in your browser, GeoNames (via all-the-cities), polygon-clipping – all data sources.

    Key facts

    Will the new house next door shade my garden in winter? How far does the shadow of a three-storey block reach in the afternoon, and how many hours of sun will the terrace get once the extension is built? Questions like these come up in every building project, and the usual answers are "ask an architect" or "build a 3D model". This tool answers them on a map in a minute. Zoom in to the building, then either pick it from the map, which takes the outline and, where OpenStreetMap has one, the height, or click its corners yourself; a planned building that does not exist yet is drawn the same way. Type the height to the top of the roof, choose a date and drag the time slider: the dark area is the shadow at that moment, and thin blue outlines show where the shadow lies at each full hour of the day, so you can see it sweep across the neighbouring plots from morning to evening. Add more buildings to see how their shadows combine. Then switch the click to "sets the point for sun hours" and click a spot in the garden, on the terrace or at a window, and give its height above the ground if it is a balcony or a solar panel. The panel counts the minutes of direct sun that reach that point between sunrise and sunset, lists the times it lies in shade, and a table compares the chosen day with 21 March, 21 June and 21 December, the days planners use for the equinox, midsummer and midwinter. The buildings, the date and the point are kept in the share link, and the shadows can be downloaded as GeoJSON or KML for QGIS, Google Earth or a planning drawing.

    How to use it

    1. Search your town, zoom in to the building, and pick it from the map or click its corners one by one.
    2. Type the height of the building to the top of the roof, in metres or feet; add more buildings with "New building".
    3. Choose a date and drag the time slider to see the shadow; the blue outlines show the shadow at every full hour.
    4. Choose "sets the point for sun hours" and click your garden, terrace or window to count its hours of direct sun.
    5. Copy the share link, or download the buildings and shadows as GeoJSON or KML.

    How accurate is it?

    How the shadow is calculated

    The sun's elevation and direction come from the NOAA solar equations, the same as on the sun position calculator, which agree with an astronomical ephemeris to about 0.015°. Each building is treated as a block with a flat top at the height you give: every corner of the roof casts its shadow at a distance of height divided by the tangent of the sun's elevation, directly away from the sun, and the shadow is the area swept by the outline between the ground and the roof. The pieces are joined into one exact outline, so an L-shaped house keeps its inside corner instead of being treated as a box. A 10 m building with the sun at 30° casts a 17.3 m shadow; at 15° it is 37.3 m, and at 5° more than 114 m.

    How the sun hours at a point are counted

    For each minute of the day between sunrise and sunset the tool checks whether the line from your point towards the sun passes through any of the buildings, taking the height of the point into account. The result is the number of minutes of direct sun that the drawn buildings let through, and the times of shade. The positions are worked out in a flat local plane around the buildings on the WGS84 ellipsoid, which is accurate to well under a centimetre over a hundred metres.

    What the calculation leaves out

    The ground is taken as flat and level. On a slope that falls away from the sun shadows are longer, on one that rises towards it shorter. Trees, hedges, fences, hills and any building you have not drawn are ignored, as is the shape of the roof: a pitched roof casts a slightly shorter shadow than a flat roof at the ridge height, so using the ridge height errs on the safe side. Clouds and the real horizon decide whether the sun actually shines.

    Good to know

    Heights from OpenStreetMap are often estimates

    When you pick a building, its height comes from OpenStreetMap. Some buildings are mapped with a measured height, many only with the number of floors, which is converted at roughly 3 m a floor, and many with nothing, in which case the map uses a default of a few metres. Check the height against the plans, the building permit or a simple count of floors, and type the real value. Outlines from the map can also be simplified or a little out of date.

    Very long shadows near sunrise and sunset

    With the sun a few degrees above the horizon, shadows run for hundreds of metres, and in practice the low sun is usually blocked by something else long before the shadow ends. The hourly outlines start when the sun is 2° high, and the shadow at the chosen time is cut at 3 km. For planning questions, the hours around midday and the winter months matter most.

    No legal assessment

    Rules on how much shade a new building may cast on a neighbour differ between countries and municipalities, and often depend on distances to the boundary rather than on hours of sun. This tool shows the geometry, not whether a project is allowed. Ask the local building authority, and use the downloaded shadows as a starting point for that conversation.

    Summer time and the time zone

    Times are shown in the local time zone of the building, with summer time where it applies, so the shadow at 15:00 in July is the shadow at 15:00 on the clocks there. Solar noon, when shadows are shortest and point exactly north (in the southern hemisphere south), comes around or after 13:00 in summer in most of Europe.

    Frequently asked questions

    How do I calculate the shadow of a house?

    Divide the height of the house by the tangent of the sun's elevation: a 10 m house with the sun 30° high casts a 17.3 m shadow. The direction is opposite to the sun. This tool does it for the whole outline at once and for every minute of the day: draw the house, set the height, choose the date and time and the shadow appears on the map.

    Will a new building next door shade my garden?

    Draw the planned building where it will stand, with its height from the plans, then click a spot in your garden. The table shows how many hours of direct sun the spot gets on 21 March, 21 June and 21 December with that building, and when it lies in shade. Compare with a lower height to see how much each storey matters.

    How long is the shadow of a building in winter?

    Much longer than in summer. At noon on 21 December the sun is only about 14° high in Berlin, 15° in London and 18° in Paris, so a 10 m building casts a shadow of about 40 m, 37 m and 31 m; in the morning and afternoon it is longer still. In June the noon shadow of the same building is only about 5 m.

    How many hours of sun will my balcony or solar panel get?

    Choose the point mode, click the balcony or panel and type its height above the ground. The tool counts the minutes of direct sun that the drawn buildings let through. It does not include the angle of the panel or clouds; for the energy yield of a solar panel, use the sun hours as an input to a solar calculator.

    Can I use this for a planning application?

    You can use it to understand and show the shade a building will cast, and the GeoJSON or KML can be opened in QGIS or Google Earth. It is not an official shadow study: the ground is treated as flat, roofs as flat and only the buildings you draw are included. Whether a shade is acceptable is decided by the local rules and authority.

    Something wrong or missing? E-mail [email protected] and it will be fixed.