Help with formula regarding dB

I know the formulas are all over google - and there are dozens of sites explaining the log function of a calcualtor.

Math was not my strong suite in high school.

My head is spinning and I just spent the last hour going down google search rabbit holes. Someone please help me.

I am trying to figure out HOW (on a calculator) to determine voltage and power gain using a simple calculator. Jesus why does this have to be so complicated and convoluted?

Voltage gain is explained as

20log10(v2/v1)

What are the order of operations here?

I already understand the obvious here - v2 is divided by v1. The result is then multiplied by... drum roll.. WHAT?!

What the hell is 20log10? How do I enter this on a darn calculator? What is being done here?

20 times log10? 20log times ten?

Whatever the heck the above equates to... * (v2 / v1), correct?

How. On. Earth. Do. I. Enter. This. On. A. Calculator?

Since I am a software engineer, I am trying to at LEAST think of this as a line of code....

20 * log(10) * (v1/v2)
or ?
 
log or log10 is the logarithm based on 10. Other frquently used logarithm is ln (natural) logarithm, not used for dB calculation.
Simply calculate the voltage ratio, then find the 10-based logarithm, and multiply by 20. Or calculate the power ratio, find the 10-based log, and this is Bels. Multiply by 10 for deciBels or dB.
 
The source of your confusion was possibly the way in which it was written. The proper way would be the following that reads something like "20 times the base-10 logarithm of the ratio of V1 to V2".

1719848952948.png


On a calculator, the base-10 logarithm is log(.) while the base-e logarithm is ln(.), pronounced log and lon respectively.

Hope that helps.
 
Or another way, think of the bel as the log-base-10 of the power ratio:

* bels = log10(Pout/Pin)

Then the other bits are embelishments on this basic relationship,

* decibels = 10 x bels. [ decibel is a tenth of a bel ]

* Pout/Pin = (Vout/Vin)^2 [ power ratio = square of voltage ratio (or square of current ratio) - for a fixed load impedance. ]

The confusing bit may be the factor twenty. This is due to the relationship:
* log(x^2) = 2 x log(x)

So combining the last three equations gives.
* decibels = 20 x log10(Vout/Vin)