Voltage divider resistor calculator
Going from 12 V down to 5 V with 10000 Ω on top, the lower resistor must be 7142.85714286 Ω. Enter the input voltage, the target output and the upper resistor to get the exact lower value, the divider current and each resistor's power. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Input voltage
- 12
- Output voltage
- 5
- R1
- 10,000
- R1 ohms
- 10,000
- R2 ohms
- 7,142.85714286
- Ratio
- 0.4166666667
- Divider current amps
- 0.0007
This voltage divider resistor calculator finds the lower resistor needed to produce a target output voltage when the input voltage and upper reference resistor are already chosen. The calculation models a classic unloaded two-resistor divider, uses deterministic arithmetic, and clearly rejects impossible targets.
Define the divider and enter the three known values
All three values must be finite and greater than zero. The target voltage must also be strictly below the input voltage; an ordinary passive divider cannot create a voltage equal to or greater than its source. Use base units rather than labels: enter 10000 for ten kilohms and 0.0033 for 3.3 millivolts.
Choose R1 with the wider circuit in mind. A smaller resistance produces more standing current and tends to make the divider less sensitive to a following load, but wastes more energy. A larger resistance reduces current and power, yet makes input leakage, measurement impedance and noise more important.
The returned value is an exact mathematical resistance, so a physical design may require selecting a nearby preferred resistor value and checking the resulting voltage separately.
Account for loading, tolerance, power and real components
The computed output assumes nothing draws current from the divider midpoint. A practical design should include the load resistance in a fuller circuit calculation or choose divider current comfortably above the expected load current, subject to the power budget. Resistor tolerance also shifts the ratio: two one-percent parts can combine in the unfavorable direction, so safety-sensitive thresholds deserve a worst-case analysis rather than reliance on nominal values.
Check maximum resistor voltage, continuous wattage and environmental derating when Vin or dissipation is substantial. For battery monitoring, consider whether permanent divider current is acceptable; a switched divider may save energy. For precision references, temperature coefficient and source variation can dominate the arithmetic.
What you can do with it
Scale a voltage for an ADC
Choose an upper resistor and calculate the lower resistor that maps a sensor or battery voltage into an ADC input range, then check input loading separately.
Set a feedback or bias target
Find the nominal second resistor for a regulator feedback node or transistor bias divider before applying datasheet-specific current and tolerance constraints.
FAQ
Which resistor does this calculator find?
R1 is the chosen upper resistor connected from Vin to the output node.
Can the target output equal or exceed the input?
Use an active circuit when voltage gain is required.
How much does the calculator cost?
The browser version runs free on your device.
Does the result account for a connected load?
No. It assumes nothing draws current from the midpoint. Include the load in a fuller calculation, or make the divider current comfortably larger than the load current, within your power budget.
What if the exact value is not a standard resistor?
Pick a nearby preferred value and recheck the output voltage. Allow for tolerance too: two 1 % parts can shift the ratio in the unfavourable direction, so critical thresholds deserve a worst-case check.
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/elec/voltage-divider-resistor \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"input_voltage":12,"output_voltage":5,"r1":10000}'const res = await fetch("https://api.kit.forhosting.com/elec/voltage-divider-resistor", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"input_voltage": 12,
"output_voltage": 5,
"r1": 10000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/elec/voltage-divider-resistor",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"input_voltage": 12,
"output_voltage": 5,
"r1": 10000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/elec/voltage-divider-resistor", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"input_voltage":12,"output_voltage":5,"r1":10000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"input_voltage":12,"output_voltage":5,"r1":10000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/elec/voltage-divider-resistor", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"input_voltage": 12,
"output_voltage": 5,
"r1": 10000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "elec.voltage_divider_resistor",
"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
It runs free in the browser, while automated API requests cost $0.002 per item.
Define the divider and enter the three known values
Enter input_voltage as Vin in volts, output_voltage as the desired unloaded Vout in volts, and r1 as the chosen reference resistance in ohms.
Understand the formula and every returned measurement
The current is the same through both resistors in this ideal unloaded circuit. The calculator applies that expression directly and reports r2_ohms. It also returns ratio, which is Vout divided by Vin, and divider_current_amps, which is Vin divided by the total series resistance. Impossible or numerically unrepresentable configurations fail with an invalid_input error instead of returning Infinity or a misleading result.
Account for loading, tolerance, power and real components
The browser calculation is useful for one-off design work, and the API provides the same deterministic contract for BOM tools, configurators and automated electronics exercises at $0.002 per successful item.
Integration use cases
Generate electronics exercises
Create repeatable answer keys that solve R2 from Vin, Vout and R1 while also exposing divider current and individual resistor dissipation.
Technical questions
What formula is used to find R2?
For an unloaded divider, R2 = R1 × Vout / (Vin − Vout). The target must satisfy 0 < Vout < Vin.
Does the result account for a connected load?
No. It is the nominal unloaded result. A finite load appears in parallel with R2 and must be included in a loaded-divider analysis.