Calculations for the dynamic response of multistory buildings to earthquake accelerations of bedrock should include the effects of the soil and the structural foundation. For this purpose a three-dimensional analytical model is developed, consisting of the following parts. The superstructure is modeled as a tier building (with rigid floor diaphragms, space frame members, bracing, and setbacks); the foundation is approximated by a rigid block in combination with piles (prismatic members with pinned ends), and the soil is idealized by a finite-element mesh (three-dimensional rectangular prisms) with special boundary conditions (viscous damping at lateral boundaries and a rigid boundary at bedrock). This analytical model is incorporated into a computer program, which performs response analyses for specified earthquakes. Sample problems are included to demonstrate the capabilities of both the analytical model and the computer program. The results show that the combination of a three-dimensional analytical model and the presence of underlying soil has important influences on the calculated responses of multistory buildings to earthquakes.