How do you calculate the SNR in decibels?

SNR (in dB) = 10 * log10(Psignal / Pnoise)

where:

SNR: Signal-to-Noise Ratio in decibels (dB)

Psignal: Power of the signal

Pnoise: Power of the noise

Both the signal and noise power should be measured in the same units for this calculation. The result will be in decibels, which is a logarithmic scale used to express large ratios in a more manageable way.

Remember that a higher SNR value indicates a stronger and cleaner signal, while a lower SNR value suggests more noise relative to the signal.