# Signal gain and loss calculator

## About this calculator

This calculator computes how much power comes out if a certain input power is subjected to gain or loss, specified in dB or %. Instead of power it is also possible to use pulse energies. The gain or loss is proportional to the input signal and therefore the output is simple some factor $k$ times the input.

$P_{out} = k \cdot P_{in}$

If gain/loss $\alpha$ is given in %, $k$ is simply

$k = \alpha / 100$

If gain/loss $\alpha$ is given in dB, $k$ is

$k = 10^{\frac{\alpha}{10}}$

For the example numbers, this evaluates to

$k = 10^{\frac{-3.0}{10}} \approx 0.501$

So the output power is

$P_{out} = 0.501 \cdot 3.0 \space mW \approx 1.50 \space mW$

And loss in percent is

$(0.501 - 1) \cdot 100 \% = -49.9 \%$