gain is output / input, so differential gain is (output2 - output1) / (input2 - input1), common mode gain is (output1 + output2) / (input1 + input2). For common mode there has to be a reference ground to measure against, that may be explicit or implicit (just ground).
Gain can also be quoted for DC or AC (small signal), the latter not being sensitive to DC offsets.
Gain is usually voltage gain, but current gain is also a thing, same principles apply.
If the device is differential input and single-ended output, simply use ground as the output2 in the equations.
If you have current input and voltage output, gain is called "transimpedance", and has units of ohms,
if voltage input and current output, gain is called "transconductance", units of siemens (1/ohm).