Relativistic cosmology can be formulated covariantly, but in dealing with numerical relativity simulations a gauge choice is necessary. Although observables should be gauge-invariant, simulations do not necessarily focus on their computations, while it is useful to extract results invariantly. To this end, in order to invariantly characterize spacetimes resulting from cosmological simulations, we present two different methodologies to compute the electric and magnetic parts of the Weyl tensor, Eαβ and Bαβ, from which we construct scalar invariants and the Weyl scalars. The first method is geometrical, computing these tensors in full from the metric, and the second uses the 3+1 slicing formulation. We developed a code for each method and tested them on five analytic metrics, for which we derived Eαβ and Bαβ and the various scalars constructed from them with computer algebra software. We find excellent agreement between the analytic and numerical results. The slicing code outperforms the geometrical code for computational convenience and accuracy; on this basis we make it publicly available in github with the name EBWeyl [1]. We emphasize that this post-processing code is applicable to any numerical spacetime in any gauge.