Given an arbitrarily complicated object, it is often difficult to say immediately how it interacts with a specific illumination. Optically small objects, e.g., spheres, can often be modeled as electric dipoles, but which multipole moments are excited for larger particles possessing a much more complicated shape? The T-matrix answers this question, as it contains the entire information about how an object interacts with any electromagnetic illumination. Moreover, a multitude of interesting properties can be derived from the T-matrix such as the scattering cross section for a specific illumination and information about symmetries of the object. Here, we present a method to calculate the T-matrix of an arbitrary object numerically, solely by illuminating it with multiple plane waves and analyzing the scattered fields. Calculating these fields is readily done by widely available tools. The finite element method is particularly advantageous, because it is fast and efficient. We demonstrate the T-matrix calculation at four examples of relevant optical nanostructures currently at the focus of research interest. We show the advantages of the method to obtain useful information, which is hard to access when relying solely on full wave solvers.