Purpose: The purpose of this paper is to propose a scientific method to evaluate possible urban layouts of a test building integrating building regulations, natural light standard and energy requirements to achieve nearly zero-energy buildings in Estonia. The integration of building regulations, energy requirements and natural light standards is crucial to evaluate the incidence of the surrounding environment when analyzing the energy performance of buildings. Design/methodology/approach: The paper investigates the variations of the energy consumption of a model building with different orientations and variable urban surroundings configurations for the latitude of Tallinn. The different urban configurations are due to combinations of the different building requirements of fire safety, daylighting and insolation hours that in Estonia affect the layout of residential districts, thus influencing significantly the potential consumption of buildings. Different layouts of surrounding buildings have been chosen all guaranteeing at different degrees the fulfillment of the building requirements for the test building and energy simulations have been run to find the urban layouts that guarantee best performances. Findings: The outcomes show that the test building interior temperatures and energy performances vary significantly in the different urban planning configurations and for the different orientations, underlining that is strongly recommended to run always energy simulation of building considering their surrounding environment. The conclusions show the principles to integrate the building regulations to achieve nearly zero-energy districts that significantly can improve life quality in the urban environment. Originality/value: The paper analyze the energy efficiency of buildings with different features and orientations simulating their possible urban environment layouts given by building regulations, and not isolated or as built in “an open field” like most of the existing literature in the field.