Matching pans by volume
A pan swap works when the new pan holds about the same volume, so the batter ends up the same depth. A 9″ round and an 8″ square hold almost exactly the same amount, which is why they’re interchangeable for most cakes.
When the pans don’t match
Scale the recipe by the ratio of the two volumes. A 13×9″ pan holds about 1.8 times as much as a 9″ round, so make 1.8× the batter — or split a 13×9 recipe between two 9″ rounds.
Volumes are approximate usable capacity. Fill cake pans about two-thirds full and check doneness early when the batter is shallower than usual.