In this paper, an integrated layout model has been considered to incorporate intra and inter-department layout. In the proposed model, the arrangement of facilities within the departments is obtained through the QAP and from the other side the continuous layout problem is implemented to find the position and orientation of rectangular shape departments on the planar area. First, a modified version of QAP with fewer binary variables is presented. Afterward the integrated model is formulated based on the developed QAP. In order to evaluate material handling cost precisely, the actual position of machines within the departments (instead of center of departments) is considered. Moreover, other design factors such as aisle distance, single or multi row intra-department layout and orientation of departments have been considered. The mathematical model is formulated as mixed-integer programming (MIP) to minimize total material handling cost. Also due to the complexity of integrated model a heuristic method has been developed to solve large scale problems in a reasonable computational time. Finally, several illustrative numerical examples are selected from the literature to test the model and evaluate the heuristic.