In electronics, **gain** is a measure of the ability of a two-port circuit (often an amplifier) to increase the power or amplitude of a signal from the input to the output port^{[1]}^{[2]}^{[3]}^{[4]} by adding energy converted from some power supply to the signal. It is usually defined as the mean ratio of the signal amplitude or power at the output port to the amplitude or power at the input port.^{[1]} It is often expressed using the logarithmic decibel (dB) units ("dB gain").^{[4]} A gain greater than one (greater than zero dB), that is amplification, is the defining property of an active component or circuit, while a passive circuit will have a gain of less than one.^{[4]}

The term *gain* alone is ambiguous, and can refer to the ratio of output to input voltage (*voltage gain*), current (*current gain*) or electric power (*power gain*).^{[4]} In the field of audio and general purpose amplifiers, especially operational amplifiers, the term usually refers to voltage gain,^{[2]} but in radio frequency amplifiers it usually refers to power gain. Furthermore, the term gain is also applied in systems such as sensors where the input and output have different units; in such cases the gain units must be specified, as in "5 microvolts per photon" for the responsivity of a photosensor. The "gain" of a bipolar transistor normally refers to forward current transfer ratio, either *h*_{FE} ("beta", the static ratio of *I*_{c} divided by *I*_{b} at some operating point), or sometimes *h*_{fe} (the small-signal current gain, the slope of the graph of *I*_{c} against *I*_{b} at a point).

The gain of an electronic device or circuit generally varies with the frequency of the applied signal. Unless otherwise stated, the term refers to the gain for frequencies in the passband, the intended operating frequency range of the equipment.
The term *gain* has a different meaning in antenna design; antenna gain is the ratio of radiation intensity from a directional antenna to (mean radiation intensity from a lossless antenna).

Power gain, in decibels (dB), is defined as follows:

where is the power applied to the input, is the power from the output.

A similar calculation can be done using a natural logarithm instead of a decimal logarithm, resulting in nepers instead of decibels:

The power gain can be calculated using voltage instead of power using Joule's first law ; the formula is:

In many cases, the input impedance and output impedance are equal, so the above equation can be simplified to:

This simplified formula, the 20 log rule, is used to calculate a **voltage gain** in decibels and is equivalent to a power gain if and only if the impedances at input and output are equal.

In the same way, when power gain is calculated using current instead of power, making the substitution , the formula is:

In many cases, the input and output impedances are equal, so the above equation can be simplified to:

This simplified formula is used to calculate a **current gain** in decibels and is equivalent to the power gain if and only if the impedances at input and output are equal.

The "current gain" of a bipolar transistor, or , is normally given as a dimensionless number, the ratio of to (or slope of the -versus- graph, for ).

In the cases above, gain will be a dimensionless quantity, as it is the ratio of like units (decibels are not used as units, but rather as a method of indicating a logarithmic relationship). In the bipolar transistor example, it is the ratio of the output current to the input current, both measured in amperes. In the case of other devices, the gain will have a value in SI units. Such is the case with the operational transconductance amplifier, which has an open-loop gain (transconductance) in siemens (mhos), because the gain is a ratio of the output current to the input voltage.

Q. An amplifier has an input impedance of 50 ohms and drives a load of 50 ohms. When its input () is 1 volt, its output () is 10 volts. What is its voltage and power gain?

A. Voltage gain is simply:

The units V/V are optional but make it clear that this figure is a voltage gain and not a power gain.
Using the expression for power, *P* = *V*^{2}/*R*, the power gain is:

Again, the units W/W are optional. Power gain is more usually expressed in decibels, thus:

A gain of factor 1 (equivalent to 0 dB) where both input and output are at the same voltage level and impedance is also known as *unity gain*.