Insertion loss calculator
Feed 1 W into a cable or filter, measure 0.5 W at the far end, and the insertion loss is 3.01029995664 dB. Enter both powers in the same unit, then add the decibels of each stage to build a cascade budget. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- P in
- 1
- P out
- 0.5
- Power ratio
- 2
- Transmission ratio
- 0.5
- Insertion loss db
- 3.0102999566
- Kind
- loss
Insertion loss is the drop in delivered power that appears when a two-port device — a filter, cable, connector, attenuator, or waveguide section — is placed in a transmission path. RF and microwave engineers report that drop in decibels so cascade budgets add instead of multiply. The closed form is IL_dB equals ten times log ten of input power over output power, using the same watt or milliwatt unit on both ports. This insertion loss calculator accepts two strictly positive powers, evaluates that logarithm with deterministic floating-point arithmetic, and returns the loss in decibels together with the linear power ratio and the transmission fraction. Zero or negative power on either port is rejected because the real logarithm is undefined there.
What insertion loss means and how the decibel formula is defined
Insertion loss is the increase in loss, expressed in decibels, that appears when a device under test is placed between a source and a load. In the two-power form used on benches and in textbooks, you take the power that reaches the load with the device inserted as output power P_out, take the power incident on the device as input power P_in, and convert the ratio to decibels. The closed form is IL_dB equals ten times the base-ten logarithm of P_in over P_out.
That is the power form of the decibel, not the twenty-log voltage form: it applies when both numbers are power in the same physical unit. Three decibels of insertion loss means the output is half the input. Ten decibels means the output is one tenth of the input.
Twenty decibels means one hundredth. A lossless, perfectly matched through line reports zero decibels because the two powers are equal. An amplifier reports a negative insertion loss, which is insertion gain: more power leaves the device than entered it.
The algorithm requires both powers to be finite and strictly greater than zero because the real logarithm is undefined at zero and for a negative argument. Absolute levels in dBm, voltage standing-wave ratio, return loss, and scattering-parameter magnitude in a fifty-ohm system are related radio-frequency quantities with different search intents and belong on separate landings so this page stays focused on converting two powers into insertion loss in decibels.
What you can do with it
Filter, cable, and attenuator lab drills
Convert measured Pin and Pout into IL_dB so students complete insertion-loss tables and match datasheet filter or jumper figures.
Incoming inspection and cascade budgets
Turn two power-meter readings into a signed insertion-loss figure for DUT pass/fail and add stages in decibels instead of multiplying linear ratios.
FAQ
What formula does this insertion loss calculator use?
Both powers must be strictly positive and expressed in the same units. Positive results are loss; negative results are insertion gain; zero is a lossless through.
Is insertion loss the same as power gain in dB?
Search intent differs — this landing is the loss form used on filters, cables, and attenuators, not amplifier gain.
Do Pin and Pout need the same units?
Yes. The ratio is unitless only when both magnitudes share the same unit (W with W, mW with mW). Convert both sides first if your meters disagree.
What does the insertion loss calculator cost?
The browser tool is free and runs locally.
What do 10 dB and 20 dB of insertion loss mean in power?
10 dB means the output is one tenth of the input and 20 dB one hundredth. About 3 dB means half the power arrives, and 0 dB means a lossless, matched line.
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/phys/insertion-loss \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"p_in":1,"p_out":0.5}'const res = await fetch("https://api.kit.forhosting.com/phys/insertion-loss", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"p_in": 1,
"p_out": 0.5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/insertion-loss",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"p_in": 1,
"p_out": 0.5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/insertion-loss", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"p_in":1,"p_out":0.5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"p_in":1,"p_out":0.5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/insertion-loss", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"p_in": 1,
"p_out": 0.5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.insertion_loss",
"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
Input contract, response fields, units, and error behaviour
Both magnitudes must use the same physical unit — watts with watts, milliwatts with milliwatts — because the ratio is unitless only when the units match; the calculator does not convert SI prefixes for you. Numeric values and numeric strings are both accepted so form widgets and spreadsheet paste stay convenient. Classic classroom checks include one watt in and half a watt out for about three point zero one zero decibels of loss, one hundred milliwatts in and ten milliwatts out for exactly ten decibels, and equal powers for zero decibels. POST a JSON body with two required finite positive numbers: p_in, the input or incident power, and p_out, the output or transmitted power. Input power is also accepted under the aliases pin, input_power, Pin, or P_in, and output power under pout, output_power, Pout, or P_out, but only one key may appear for each side of the device. Power must be strictly greater than zero on both ports because IL_dB equals ten log ten of P_in over P_out is undefined for non-positive arguments; zero and negative power fail with invalid_input and a message that zero or negative power is not allowed. Missing fields, conflicting aliases, NaN, and Infinity fail the same way and are not charged. On success the response includes cleaned p_in and p_out, power_ratio as P_in over P_out, transmission_ratio as P_out over P_in, insertion_loss_db as the decibel result, kind as loss, gain, or unity, booleans is_loss, is_gain, and is_unity, a short expression string showing the formula with numbers, method insertion_loss, and the formula string IL_dB equals ten log ten of P_in over P_out. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where insertion-loss calculations show up in real work
Introductory RF and microwave labs constantly assign filter, cable, and attenuator drills so students can move between linear power ratios and datasheet insertion-loss figures without mixing the ten-log and twenty-log formulas. Component vendors quote insertion loss versus frequency on every filter, connector, and coaxial jumper; converting two bench power-meter readings into that figure keeps incoming inspection honest. Transmitter and receiver teams budget cascade loss by adding each stage's insertion loss in decibels instead of multiplying awkward linear fractions that hide a factor-of-two error. Optical and microwave metrology reports often mix milliwatts and dB of loss on the same page, so a single trusted closed form prevents sign errors when someone confuses insertion loss with power gain, which is the negative of the same logarithm. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance. The browser tool is free for interactive use; scripted API traffic uses prepaid KIT balance at the published rate without hidden per-field surcharges.
Integration use cases
CI fixtures and answer keys
Script the same IL_dB = 10·log10(Pin/Pout) product used in the browser so automated graders share one ground truth for power ratios.
Technical questions
What happens if input or output power is zero or negative?
The request fails with invalid_input. The real logarithm is undefined for a non-positive power ratio, so both p_in and p_out must be greater than zero.