what is the collector gain of a transistor?
Gain is generally variable in a transistor, based on the Ic, Collector current (Generally Ice to Emitter). It varies by transistor family or part. It can even vary individual parts of the same model number. Manufacturers using the same part number and design will also vary slightly. Like any semiconductor, diode, resistor, etc, no two parts are 100% identical and there is tolerances that apply. A manufacturer will try to minimize the differences, but it's impossible to do completely.

You'll need to check it's data sheet for Hfe. That is the gain parameter. Notice that the value will be a typical, or provided as a range of min to max.

This is the stats for a Fairchild 2n3904:


Gain peaks at 10mA, like a bell curve. At 10mA Ic, it's minimum should be 100 gain, while it's maximum is 300. It may actually be 150 on the part you test. When designing a board, you would want to overdrive it. Use the smallest gain listed as your design spec, instead of the typical or max. That way you can't lose.

There is no fixed formula, as the gain is a property of its design.