Ideal transformer calculator
A 240 V primary with 1000 turns and a turns ratio of 0.1 gives 24 V on a 100-turn secondary, a step-down transformer. Solve for the secondary voltage, current or turn count before ordering a wound sample or an isolation unit. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Calculate
- Voltage
- Primary turns
- 1,000
- Turns ratio
- 0.1
- Primary voltage
- 240
- Secondary value
- 24
- Secondary voltage
- 24
- Secondary turns
- 100
- Configuration
- step-down
An ideal transformer transfers energy between electrically isolated windings through a shared magnetic flux, with the textbook assumptions of zero winding resistance, zero leakage flux and zero core loss. Under those assumptions the voltage ratio equals the turns ratio Ns over Np, and current scales with the inverse ratio so that instantaneous power is conserved: Vp times Ip equals Vs times Is. This ideal transformer calculator accepts a primary quantity, a finite non-zero primary turns count, and the secondary-to-primary turns ratio Ns/Np, then returns the matching secondary value.
What an ideal transformer conserves, and why Ns/Np is the map
An ideal transformer is a first-order model of a two-winding device that transfers energy by magnetic coupling rather than by a galvanic connection between the coils. The primary winding of Np turns is driven by a source; the secondary winding of Ns turns delivers a voltage and current to a load. In the ideal model the windings are perfect inductors, the core has infinite permeability and no hysteresis or eddy-current loss, and every line of flux that links the primary also links the secondary.
Faraday's law then forces the induced voltages to scale with the number of turns: Vs divided by Vp equals Ns divided by Np. Instantaneous power is conserved because there is nowhere for energy to go except the other winding, so Vp times Ip equals Vs times Is, which rearranges to Is over Ip equals Np over Ns. Those two identities are the entire engine of this calculator.
The dimensionless turns ratio used here is n equals Ns over Np, the secondary-to-primary count that converts a primary voltage into the expected secondary voltage by multiplication. When n is greater than one the device steps voltage up and current down; when n is less than one it steps voltage down and current up; when n equals one the secondary mirrors the primary for isolation. Real transformers deviate because of regulation, magnetising current, leakage inductance and winding resistance; this capability does not invent those corrections.
Identical inputs always produce identical floating-point results because the implementation is pure arithmetic with no network calls, randomness or wall-clock dependence.
What you can do with it
Control-power and isolation transformer sizing
Designers convert a known primary RMS and a chosen turns ratio into the expected secondary voltage or current before ordering a wound sample or a catalogue isolation transformer.
FAQ
What formulas does the ideal transformer calculator use?
It uses n = Ns/Np. Secondary voltage is Vs = Vp × n, secondary current is Is = Ip × (Np/Ns) which is Ip / n, and secondary turns are Ns = Np × n. Power is conserved as Vp × Ip = Vs × Is.
Why is a zero primary turns count rejected?
An ideal transformer is undefined when the primary winding has zero turns: the ratio Ns/Np would divide by zero and voltages would be meaningless.
Is the turns ratio Ns/Np or Np/Ns?
This calculator takes n = Ns/Np, the secondary-to-primary count. Voltage multiplies by n and current divides by n.
Does this model real transformer losses and regulation?
No. It implements only the ideal relations among voltage, current and turns. Apply regulation, leakage, magnetising current and winding resistance outside this step if needed.
What does the ideal transformer calculator cost?
The browser tool is free and runs entirely on your device.
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/ideal-transformer \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"solve_for":"voltage","primary_turns":1000,"turns_ratio":0.1}'const res = await fetch("https://api.kit.forhosting.com/phys/ideal-transformer", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"solve_for": "voltage",
"primary_turns": 1000,
"turns_ratio": 0.1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/ideal-transformer",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"solve_for": "voltage",
"primary_turns": 1000,
"turns_ratio": 0.1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/ideal-transformer", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"solve_for":"voltage","primary_turns":1000,"turns_ratio":0.1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"solve_for":"voltage","primary_turns":1000,"turns_ratio":0.1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/ideal-transformer", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"solve_for": "voltage",
"primary_turns": 1000,
"turns_ratio": 0.1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.ideal_transformer",
"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.
Limits
max_abs | 1000000000000000 |
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
Choose solve_for voltage to obtain Vs from Vp, current to obtain Is from Ip, or turns to obtain Ns from Np. A zero primary turns count is rejected as invalid_input instead of producing infinity or NaN.
What an ideal transformer conserves, and why Ns/Np is the map
A zero primary turns count would make n undefined or infinite depending on how the ratio is written, so the engine rejects Np equals zero with invalid_input instead of returning Infinity or NaN.
Input contract, response shape, and the zero-turns error
Optional output keys that do not apply are omitted rather than set to null. Numeric strings that parse as finite decimals are accepted so spreadsheet paste paths keep working; Infinity, NaN and empty strings are not. POST a JSON body with solve_for, primary_turns, turns_ratio, and the primary quantity that matches the unknown you want. solve_for is a closed enumeration: voltage, current, or turns. It must be one of those three tokens; a free-text synonym is rejected so the form can render a select instead of a guess-the-syntax box. primary_turns, with aliases Np, np and n1, is required on every request and must be a finite non-zero number; zero is the documented invalid_input path, and non-numeric strings fail naming the field. turns_ratio, with aliases ratio, ns_over_np and n, is the secondary-to-primary count Ns over Np; it must be finite and non-zero because a zero ratio would force Ns to zero and would divide current by zero. When solve_for is voltage you must also send primary_voltage, aliases Vp and vp, as a finite number in volts; the engine returns secondary_value equal to Vp times n. When solve_for is current you must send primary_current, aliases Ip and ip, as a finite amperes value; secondary_value equals Ip divided by n, which is the same as Ip times Np over Ns. When solve_for is turns only Np and n are required; secondary_value equals Np times n. On success the body echoes the inputs you used, includes secondary_turns equal to Np times n, labels the configuration as step-up, step-down or unity from the magnitude of n, and restates the closed formula. Failed validation returns invalid_input naming the field and is never billed. Magnitudes stay within a published absolute limit so IEEE double precision on the Worker and in the browser remains finite. Pricing is a flat $0.002 per successful request with unit item.
Where an ideal transformer calculator earns its keep
Keep turn counts, voltages and currents inside the published range so a scaled secondary cannot overflow into a non-finite value that the solver must reject. Pair classroom examples deliberately: one thousand primary turns, n equal to one tenth and two hundred forty volts on the primary yields twenty-four volts on the secondary, a classic mains step-down; two hundred primary turns, n equal to four and eight amperes on the primary yields two amperes on the secondary, a step-up that trades voltage for current; five hundred primary turns and n equal to one fifth yields one hundred secondary turns with no voltage or current required. Prefer this capability when you already know the primary quantity and the secondary-to-primary ratio and you need the secondary value as the primary answer. A request with primary_turns equal to zero demonstrates the hard invalid_input path that textbooks describe as an undefined ratio. This landing targets people searching for an ideal transformer calculator, secondary voltage from turns ratio, or secondary current from Np and Ns online. It is not a turns-ratio landing that starts from both wound counts and reports a equals Np over Ns as the headline; it is not a core-loss, regulation or equivalent-circuit solver; and it is not a three-phase or autotransformer sizing tool. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately pass a zero primary winding. Round-trip checks are easy: recompute Vp times Ns over Np, or Ip times Np over Ns, by hand and confirm it equals the published secondary_value within the same twelve-decimal rounding.
Integration use cases
Homework checks for secondary voltage and current
Students enter Vp or Ip with Np and Ns/Np and compare the textbook Vs = Vp × Ns/Np or Is = Ip × Np/Ns result against deterministic JSON before submitting.
Lab reports and CI golden values
Produce a deterministic secondary value from fixed primary turns and ratio for lab write-ups or automated electronics self-checks that must not depend on external services.