Perovskites have proven to be a promising candidate for highly-efficient solar cells, light-emitting diodes, and X-ray detectors, overcoming limitations of inorganic semiconductors. However, they are notoriously unstable. The main reason for this instability is the migration of mobile ions through the device during operation, as they are mixed ionic-electronic conductors. Here we show how measuring the capacitance in both the frequency and the time domain can be used to study ionic dynamics within perovskite-based devices, quantifying activation energy, diffusion coefficient, sign of charge, concentration, and the length of the ionic double layer in the vicinity of the interfaces. Measuring the transient of the capacitance furthermore allows for distinguishing between ionic and electronic effects.