A comprehensive political and design theory of planetary-scale computation proposing that The Stack--an accidental megastructure--is both a technological apparatus and a model for a new geopolitical architecture. What has planetary-scale computation done to our geopolitical realities? It takes different forms at different scales--from energy and mineral sourcing and subterranean cloud infrastructure to urban software and massive universal addressing systems; from interfaces drawn by the augmentation of the hand and eye to users identified by self--quantification and the arrival of legions of sensors, algorithms, and robots. Together, how do these distort and deform modern political geographies and produce new territories in their own image? In The Stack, Benjamin Bratton proposes that these different genres of computation--smart grids, cloud platforms, mobile apps, smart cities, the Internet of Things, automation--can be seen not as so many species evolving on their own, but as forming a coherent whole: an accidental megastructure called The Stack that is both a computational apparatus and a new governing architecture. We are inside The Stack and it is inside of us. In an account that is both theoretical and technical, drawing on political philosophy, architectural theory, and software studies, Bratton explores six layers of The Stack: Earth, Cloud, City, Address, Interface, User. Each is mapped on its own terms and understood as a component within the larger whole built from hard and soft systems intermingling--not only computational forms but also social, human, and physical forces. This model, informed by the logic of the multilayered structure of protocol "stacks," in which network technologies operate within a modular and vertical order, offers a comprehensive image of our emerging infrastructure and a platform for its ongoing reinvention. The Stack is an interdisciplinary design brief for a new geopolitics that works with and for planetary-scale computation. Interweaving the continental, urban, and perceptual scales, it shows how we can better build, dwell within, communicate with, and govern our worlds. thestack.org