Decibel ratio converter
A power ratio of 2 is about 3 dB. Pick power or amplitude, enter a linear ratio or a dB level, and get both forms with the right factor: 10 for power, 20 for voltage, current or sound pressure. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Value
- 2 ratio
- Type
- power
- Db
- 3.0102999566
- Ratio
- 2
- Unit in
- ratio
- Factor
- 10
This decibel ratio converter turns a linear power or amplitude ratio into decibels, or a decibel value back into a linear ratio, with the correct factor for the quantity you mean. Power ratios use ten times the common logarithm; amplitude, voltage, and field ratios use twenty. You send a finite number, whether it is already in dB or a linear ratio, and the ratio family (power or amplitude).
Why power and amplitude need different decibel formulas
People search for a decibel ratio converter when a datasheet, spectrum plot, or gain stage is stated in dB and they need the underlying multiplier, or when they have a power or voltage ratio and must report it in decibels. The trap is treating every dB figure the same. When the ratio is of power (or energy, intensity proportional to power), the definition is ten times the base-ten logarithm of the linear ratio.
When the ratio is of amplitude quantities such as voltage, current, sound pressure, or field strength—quantities whose square is proportional to power—the definition is twenty times the same logarithm. Mixing those factors doubles or halves the reported gain and breaks link budgets, amplifier chains, and acoustic comparisons. The math is pure and local: no network lookup, no floating constants that change with locale, and no silent clamp of zero or negative ratios into a fake infinity.
Where teams use it and what it costs
Audio engineers convert signal level ratios to dB for meters and gain stages; RF and wireless teams turn path loss and antenna gain between linear and decibel forms in link calculators; hardware QA scripts normalize mixed CSV columns that alternate between voltage ratios and dB markings before they hit dashboards. Product teams embed the same conversion in lab tools and support pages so customers never apply the wrong decade factor by hand.
Map your UI labels to the allowed unit and type names, treat non-positive ratio errors as user-fixable feedback, and keep the system of record in whichever form your domain prefers while still exposing both fields in the response.
What you can do with it
RF link budget scripts
Turn power ratios for path loss, combiner loss, and amplifier gain into dB (and back) with the 10·log10 factor in batch pipelines.
Lab CSV normalization
Normalize mixed columns that store some measurements as linear ratios and others as dB before analytics or compliance reports.
FAQ
What is the difference between power and amplitude modes?
Choose the mode that matches the physical quantity behind the ratio.
Why must the linear ratio be positive?
The real common logarithm is only defined for positive numbers.
Can I convert a negative dB value?
Yes. Negative dB means attenuation (ratio less than one). Only the linear ratio input must be greater than zero.
Does 3 dB always mean a factor of two?
For power ratios, 3 dB is approximately a factor of two (exactly 10^(0.3) ≈ 1.995). For amplitude ratios, a factor of two is about 6 dB. Always set type correctly.
What does it cost?
The interactive page runs free in your browser.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/conv/decibel-ratio \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":2,"unit":"ratio","type":"power"}'const res = await fetch("https://api.kit.forhosting.com/conv/decibel-ratio", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 2,
"unit": "ratio",
"type": "power"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/conv/decibel-ratio",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 2,
"unit": "ratio",
"type": "power"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/conv/decibel-ratio", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":2,"unit":"ratio","type":"power"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":2,"unit":"ratio","type":"power"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/conv/decibel-ratio", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 2,
"unit": "ratio",
"type": "power"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "conv.decibel_ratio",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Non-positive linear ratios fail with a clear invalid_input error because the real logarithm is undefined there. Use the tool free on this page, or call the same deterministic logic by API at $0.002 per request for scripts, audio pipelines, and RF calculators that must not invent the wrong decade factor.
Why power and amplitude need different decibel formulas
This capability forces an explicit type of power or amplitude so the API never guesses. It accepts common aliases (voltage, field) for the amplitude path and returns both the decibel value and the linear ratio so clients can display either form without a second call.
How to call the converter and read the response
Send three fields: value (the finite number you already have), unit (ratio if that number is a linear multiplier, or db if it is already in decibels), and type (power for the 10·log10 family, amplitude for the 20·log10 family). When unit is db, any finite decibel number is accepted, including negatives for attenuation. The engine computes the missing counterpart: from a positive ratio it stores ratio and sets db to factor times log10(ratio); from a db level it stores db and sets ratio to ten raised to db over factor. Aliases for unit include linear and dB; aliases for type include voltage and field. When unit is ratio, value must be strictly greater than zero; zero and negative values raise invalid_input with a message that names the positivity rule. The JSON result includes db, ratio, the canonical type, unit_in, the numeric factor (10 or 20), and a short formula string for documentation or audit trails. Missing fields, non-finite numbers, and unknown unit or type names all fail with invalid_input naming what was wrong, so form validation and API error handling stay aligned.
Where teams use it and what it costs
Prefer this endpoint when search intent is specifically decibel versus linear ratio for power or amplitude; use broader unit converters for unrelated dimensions.
Integration use cases
Audio gain and level stages
Convert amplifier gain or attenuation between linear voltage ratios and dB so meters, DAW plugins, and API jobs use the same 20·log10 definition.