PRICES MAY VARY. The book describes application of the finite element method to electro- and magnetostatic problems. The main emphasis of the book is on the electromagnetic formulations rather than on the diverse features of the finite element method. Boundary value problems based on the div-grad and curl-curl equations, are discussed in great detail. All derivation steps on the way from Maxwell’s equations to the numerical recipes that can be programmed into a computer are discussed at length. A special attention is paid to boundary and interface conditions. The book is supplemented with computer code written with a help of deal.II finite element library. The computer code illustrates application of the finite element method to various electromagnetic formulations discussed in the book. The documentation of the computer code exists in the form of an online book at www.cembooks.nl. The computer code can be downloaded at www.cembooks.nl or, alternatively, at www.github.com/cembooks. The finite element method is described as seen by a user of the deal.II finite element library. The mesh cells are assumed to be quadrilateral and hexahedral in two- and three-dimensional spaces, respectively. The four finite elements essential for the De Rham complex are assumed to be the finite elements available in deal.II, i.e., Lagrange, Nedelec, Raviart-Thomas, and discontinuous Lagrange finite elements. All dielectric and magnetic materials are assumed to be linear, lossless, and isotropic.