Extremely large nonsaturating magnetoresistance has recently been reported for a large number of both topologically trivial and nontrivial materials. Different mechanisms have been proposed to explain the observed magnetotransport properties, yet without arriving to definitive conclusions or portraying a global picture. In this work, we investigate the transverse magnetoresistance of materials by combining the Fermi surfaces calculated from first principles with the Boltzmann transport theory approach relying on the semiclassical model and the relaxation time approximation. We first consider a series of simple model Fermi surfaces to provide a didactic introduction into the charge-carrier compensation and open-orbit mechanisms leading to nonsaturating magnetoresistance. We then address in detail magnetotransport in three representative materials: (i) copper, a prototypical nearly free-electron metal characterized by the open Fermi surface that results in an intricate angular magnetoresistance, (ii) bismuth, a topologically trivial semimetal in which very large magnetoresistance is known to result from charge-carrier compensation, and (iii) tungsten diphosphide WP2, a recently discovered type-II Weyl semimetal that holds the record of magnetoresistance in compounds. In all three cases our calculations show excellent agreement with both the field dependence of magnetoresistance and its anisotropy measured at low temperatures. Furthermore, the calculations allow for a full interpretation of the observed features in terms of the Fermi surface topology. Our study thus establishes guidelines to clarifying the physical mechanisms underlying the magnetotransport properties in a broad range of materials. These results will help addressing a number of outstanding questions, such as the role of the topological phase in the pronounced large nonsaturating magnetoresistance observed in topological materials.