Decibels are defined as ten times the log of a power ratio or twenty times the log of Voltage Ratio.
dB = 20log10(V1/V2) = 10log10(P1/P2)
You can also use this calculator to find out the Power Gain and Voltage Gain from the Decibel value. Just enter the Decibel value and leave Power Gain & Voltage Gain blank, and then hit the Calculate button.
dBm Calculator:
As we know Decibel in dB can be calculated as:
dB= 20log(V1/V2)= 10log(P1/P2)
If we put P2 = 1mW = .001 watt then it becomes dBm:
dBm= 10log(p1/.001)
Means dBm is calculated when the input power is considered as 1mW