Personally I would never try to apply a mathematical formula to this. It's an art form.
Just try to give them all an equal prominence to the human eye. This can depend on a lot of factors, not just the height/width ratio of each logo (some logos are designed to be very eye-catching whereas some try to look subtle, and you have to compensate for this in the way you size them).
Keep playing around with the size of them all until there's no logo in particular which "leaps out" more than the rest. Get second opinions off other people.
New! Stand out from the crowd by taking our gamified personality tests. Get started now by discovering the three tests available free of charge!