Critical magnetic fluctuations in the layered ruthenates Ca
2RuO
4 and Ca
3Ru
2O
7Using neutron triple-axis spectroscopy, this work determines the critical exponents of the magnetic order parameter, correlation length, susceptibility, and characteristic energy for the square-lattice antiferromagnets Ca$_2$RuO$_4$ and Ca$_3$Ru$_2$O$_7$. The single-layer compound Ca$_2$RuO$_4$ exhibits critical behavior consistent with the universal scaling laws of the two-dimensional XY model, whereas the bilayer Ca$_3$Ru$_2$O$_7$ is best described by the three-dimensional Ising model, likely due to intra-bilayer exchange and orthorhombic single-ion anisotropy. The results identify layered ruthenates as promising platforms for studying the 2D-XY model and the effects of three-dimensional interactions and spin anisotropies.