help-calc

08 Numbers and Units

How to Convert to Decibels (dB) Easily

Card 08-0319 · Updated · Standard formula, shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

This calculator converts a power or amplitude ratio into decibels (dB), and also converts a dB value back into a linear ratio. You enter either the two levels or the dB value, and you get the result in dB or as a ratio. No need for log tables or a scientific calculator.

Formula

The decibel is a logarithmic unit that compares two quantities. For power quantities (watts, milliwatts, etc.):

dB = 10 × log₁₀(P₁ / P₂)

For amplitude quantities (volts, amps, sound pressure, etc.):

dB = 20 × log₁₀(A₁ / A₂)

Where:

  • P₁ = power value 1 (in watts, milliwatts, etc.)
  • P₂ = power value 2 (reference power, same unit)
  • A₁ = amplitude value 1 (volts, pascals, etc.)
  • A₂ = amplitude value 2 (reference amplitude, same unit)
  • log₁₀ = base-10 logarithm

Use the 10× formula for power (energy per time) and the 20× formula for amplitude (field quantities). The calculator automatically applies the correct factor based on your selection.

Worked Example

Using the default values: P₁ = 100 W, P₂ = 1 W, type = Power.

Step 1: Divide the two powers: 100 / 1 = 100.

Step 2: Take the base-10 logarithm: log₁₀(100) = 2.

Step 3: Multiply by 10: 10 × 2 = 20 dB.

So 100 W relative to 1 W is 20 dB. The linear ratio is 100:1. This matches the calculator output.

When to Use This Conversion

Converting to decibels is common in audio engineering (signal levels, speaker output), telecommunications (signal loss, gain), acoustics (sound pressure levels), and electronics (amplifier gain). Decibels compress huge ratios into manageable numbers: a power ratio of 10,000,000 becomes just 70 dB. This makes it easier to compare systems, specify equipment, and calculate cascaded gains (just add dB values).

You can also use the reverse: if you know a system has 3 dB gain, that means the power is doubled (since 10×log₁₀(2) ≈ 3.01 dB). For amplitude, 6 dB means double the voltage (20×log₁₀(2) ≈ 6.02 dB).

How to Read the Result

A positive dB value means the first quantity is larger than the second; a negative value means it is smaller. Zero dB means they are equal. For example, if you measure an amplifier output of 50 W with an input of 1 W, the gain is 10×log₁₀(50/1) ≈ 17 dB. If you see −3 dB, that means the output is about half the input power.

Remember that dB is always a ratio between two values. It is not an absolute unit unless you specify a reference, such as dBm (decibels relative to 1 milliwatt) or dB SPL (relative to 20 µPa). This calculator gives you the ratio; you can add or subtract a reference to get absolute levels.

Common Mistakes

  • Using 10× for amplitude: This is the most frequent error. Voltage, current, and sound pressure use 20× because power is proportional to the square of amplitude. If you use 10× for a voltage ratio of 10, you get 10 dB, but the correct answer is 20 dB.
  • Mixing units: Both values must be in the same unit. Comparing watts to milliwatts without converting gives a wrong ratio. Always convert to the same unit first.
  • Forgetting the logarithm: Some people try to average dB values linearly. dB values are logarithmic; you cannot simply add them unless they are gains in cascade. For averaging, convert back to linear, average, then convert again.
  • Using natural log: The decibel is defined with base-10 logarithms. Using ln (natural log) will give a different number. This calculator uses log₁₀.

Tips

  • Memorize a few key reference points: 0 dB = 1:1, 3 dB ≈ 2:1 power, 6 dB ≈ 4:1 power (or 2:1 amplitude), 10 dB = 10:1 power, 20 dB = 100:1 power. This helps you estimate without a calculator.
  • When adding or subtracting dB values (for cascaded stages), just add the dB numbers. For example, a 10 dB gain followed by a 6 dB loss gives a net +4 dB.
  • If you need absolute levels, use a reference like dBm (1 mW) or dBW (1 W). For example, 30 dBm = 1 W because 10×log₁₀(1 W / 1 mW) = 10×log₁₀(1000) = 30 dBm.
  • For quick mental math, remember that every 10 dB multiplies the power ratio by 10. So 20 dB = 100×, 30 dB = 1000×, etc.
  • When measuring sound pressure, use the amplitude formula (20×) because sound pressure is an amplitude quantity.

Limits of the Formula

The decibel formula assumes a positive ratio. If you enter zero as a reference, the log of zero is undefined. The calculator enforces a minimum of 1e-12 to avoid this. Also, the formula works for any positive real numbers, but it does not apply to negative powers or amplitudes (which are not physical in most contexts). For very large ratios (like 10¹²), the dB value becomes large (120 dB for power), which is fine, but be aware that practical measurements may have noise floors.

Troubleshooting

  • Result shows “Cannot compute”: This happens if the second value is zero or negative. Check that both inputs are positive numbers. The calculator rejects zero, but if you see this message, enter a small positive number like 0.001.
  • Result is negative: That is correct if the first value is smaller than the second. For example, 1 W relative to 100 W is −20 dB. If you expected a positive value, swap the two inputs.
  • Result seems too large or too small: Double-check the unit consistency. If you entered milliwatts in one field and watts in the other, the ratio will be off by 1000×. Convert to the same unit first.
  • Not sure which formula to use: If you are comparing watts, milliwatts, or any energy per time, use Power. If you are comparing volts, amps, or sound pressure, use Amplitude. When in doubt, look at the units: if they are squared in the power equation, it is amplitude.
  • Calculator gives 0 dB for equal values: That is correct. log₁₀(1) = 0, so any equal ratio is 0 dB.

Frequently Asked Questions

What is the difference between dB and dBm?

dB is a ratio between two values. dBm is an absolute power level referenced to 1 milliwatt. For example, 0 dBm = 1 mW, and 10 dBm = 10 mW. To convert from dBm to watts, use P(W) = 1 mW × 10^(dBm/10).

Why do we multiply by 20 for voltage but 10 for power?

Because power is proportional to the square of voltage (P = V²/R). In logarithms, squaring becomes multiplication by 2, so 10×log₁₀(V₁²/V₂²) = 20×log₁₀(V₁/V₂).

Can I convert dB back to a ratio?

Yes. If you have a dB value, the power ratio is 10^(dB/10), and the amplitude ratio is 10^(dB/20). For example, 3 dB power gain means ratio = 10^(0.3) ≈ 2.

What does 0 dB mean?

It means the two quantities are equal. For example, if an amplifier has 0 dB gain, the output power equals the input power.

Is dB always positive?

No. If the first value is smaller than the second, the dB value is negative. For example, a signal that is half the reference power is about −3 dB.

How do I add dB values?

When you have cascaded components (e.g., amplifier + cable), you simply add the dB gains/losses. For example, +10 dB and −6 dB gives +4 dB total. This works because logarithms turn multiplication into addition.

Related

Formula used
in p1 | Power or amplitude value 1 | W | 100 | 0.000000000001 | 1000000000000
in p2 | Power or amplitude value 2 | W | 1 | 0.000000000001 | 1000000000000
sel type | Measurement type | Power=1, Amplitude=2
out dB | Decibels | dB | 10 * log10(p1 / p2) * type | 2
out ratio | Linear ratio | - | p1 / p2 | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this shelf

The whole Numbers and Units shelf →