{"id":2975,"date":"2026-04-24T13:39:14","date_gmt":"2026-04-24T11:39:14","guid":{"rendered":"https:\/\/science-x.net\/?page_id=2975"},"modified":"2026-04-24T13:39:15","modified_gmt":"2026-04-24T11:39:15","slug":"magnetic-field-strength-calculator","status":"publish","type":"page","link":"https:\/\/science-x.net\/?page_id=2975","title":{"rendered":"Magnetic Field Strength Calculator"},"content":{"rendered":"\n<div class=\"eco-tool wp-block-group\" id=\"eco-tool-magnetic-field-2fa6d\">\n  <div class=\"eco-tool__header\">\n    <h2 class=\"eco-tool__title\">Magnetic Field Strength Calculator<\/h2>\n    <p class=\"eco-tool__lead\">\n      Calculate magnetic field strength around a straight current-carrying wire.\n    <\/p>\n  <\/div>\n\n  <form class=\"eco-tool__form\" id=\"eco-magnetic-form-2fa6d\" novalidate>\n    <div class=\"eco-tool__grid3\">\n      <div class=\"eco-tool__field\">\n        <label class=\"eco-tool__label\" for=\"eco-magnetic-current-2fa6d\">Current<br>(A)<\/label>\n        <input class=\"eco-tool__input\" id=\"eco-magnetic-current-2fa6d\" type=\"number\" min=\"0\" step=\"0.01\" value=\"10\" inputmode=\"decimal\" \/>\n        <div class=\"eco-tool__hint\">Electric current through the wire.<\/div>\n      <\/div>\n\n      <div class=\"eco-tool__field\">\n        <label class=\"eco-tool__label\" for=\"eco-magnetic-distance-2fa6d\">Distance from wire<br>(m)<\/label>\n        <input class=\"eco-tool__input\" id=\"eco-magnetic-distance-2fa6d\" type=\"number\" min=\"0.000001\" step=\"0.001\" value=\"0.05\" inputmode=\"decimal\" \/>\n        <div class=\"eco-tool__hint\">Distance from the center of the wire.<\/div>\n      <\/div>\n\n      <div class=\"eco-tool__field\">\n        <label class=\"eco-tool__label\" for=\"eco-magnetic-unit-2fa6d\">Output<br>unit<\/label>\n        <select class=\"eco-tool__input\" id=\"eco-magnetic-unit-2fa6d\">\n          <option value=\"t\">Tesla (T)<\/option>\n          <option value=\"mt\">Millitesla (mT)<\/option>\n          <option value=\"ut\">Microtesla (\u00b5T)<\/option>\n        <\/select>\n        <div class=\"eco-tool__hint\">Choose how to display the result.<\/div>\n      <\/div>\n    <\/div>\n\n    <div class=\"eco-tool__actions\">\n      <button type=\"button\" class=\"wp-element-button eco-tool__btn\" id=\"eco-magnetic-calc-2fa6d\">Calculate<\/button>\n      <button type=\"button\" class=\"wp-element-button eco-tool__btn eco-tool__btn--ghost\" id=\"eco-magnetic-reset-2fa6d\">Reset<\/button>\n      <div class=\"eco-tool__error\" id=\"eco-magnetic-error-2fa6d\" aria-live=\"polite\"><\/div>\n    <\/div>\n  <\/form>\n\n  <div class=\"eco-tool__result\" id=\"eco-magnetic-result-2fa6d\" hidden>\n    <h3 class=\"eco-tool__subtitle\">Result<\/h3>\n\n    <div class=\"eco-tool__cards\">\n      <div class=\"eco-tool__card\">\n        <div class=\"eco-tool__metric-label\">Magnetic field strength<\/div>\n        <div class=\"eco-tool__metric-value\" id=\"eco-magnetic-main-2fa6d\">\u2014<\/div>\n        <div class=\"eco-tool__metric-sub\" id=\"eco-magnetic-main-sub-2fa6d\"><\/div>\n      <\/div>\n\n      <div class=\"eco-tool__card\">\n        <div class=\"eco-tool__metric-label\">Equivalent values<\/div>\n        <div class=\"eco-tool__metric-value\" id=\"eco-magnetic-alt-2fa6d\">\u2014<\/div>\n        <div class=\"eco-tool__metric-sub\" id=\"eco-magnetic-alt-sub-2fa6d\"><\/div>\n      <\/div>\n    <\/div>\n\n    <div class=\"eco-tool__card eco-tool__card--wide\">\n      <div class=\"eco-tool__metric-label\">Breakdown<\/div>\n      <div class=\"eco-tool__bars\" id=\"eco-magnetic-bars-2fa6d\"><\/div>\n      <div class=\"eco-tool__metric-sub eco-tool__muted\" id=\"eco-magnetic-tip-2fa6d\"><\/div>\n    <\/div>\n\n    <p class=\"eco-tool__note\">\n      Idealized calculation only. This formula assumes a long straight wire in free space.\n    <\/p>\n  <\/div>\n\n  <details class=\"eco-tool__details\">\n    <summary class=\"eco-tool__summary\">How we calculate<\/summary>\n    <div class=\"eco-tool__details-body\">\n      <p class=\"eco-tool__text\">\n        Magnetic field around a straight wire: B = \u03bc\u2080I \/ (2\u03c0r).\n      <\/p>\n      <ul class=\"eco-tool__list\" id=\"eco-magnetic-factors-2fa6d\"><\/ul>\n    <\/div>\n  <\/details>\n<\/div>\n\n<style>\n.eco-tool{border:1px solid rgba(0,0,0,.12);border-radius:12px;padding:16px}\n.eco-tool__header{margin-bottom:12px}\n.eco-tool__title{margin:0 0 8px}\n.eco-tool__lead{margin:0;opacity:.9}\n.eco-tool__form{margin-top:12px}\n.eco-tool__grid3{display:grid;grid-template-columns:1fr;gap:16px}\n@media (min-width:860px){.eco-tool__grid3{grid-template-columns:1fr 1fr 1fr}}\n.eco-tool__field{display:flex;flex-direction:column;gap:6px}\n.eco-tool__label{font-weight:600}\n.eco-tool__input{width:100%;height:44px;padding:0 12px;border:1px solid rgba(0,0,0,.20);border-radius:10px;background:#fff;box-sizing:border-box;font:inherit}\n.eco-tool select.eco-tool__input{appearance:none;-webkit-appearance:none;line-height:44px;padding-right:40px;background-image:linear-gradient(45deg,transparent 50%,rgba(0,0,0,.60) 50%),linear-gradient(135deg,rgba(0,0,0,.60) 50%,transparent 50%);background-position:calc(100% - 18px) 50%,calc(100% - 12px) 50%;background-size:6px 6px;background-repeat:no-repeat}\n.eco-tool__hint{font-size:.92em;opacity:.78;min-height:38px}\n.eco-tool__actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:16px}\n.eco-tool__btn{padding:10px 22px}\n.eco-tool__btn--ghost{background:transparent!important;border:1px solid rgba(0,0,0,.20)!important}\n.eco-tool__btn--ghost:hover,.eco-tool__btn--ghost:focus{background:rgba(0,0,0,.06)!important;border-color:rgba(0,0,0,.35)!important}\n.eco-tool__error{min-height:1.2em;font-weight:600;flex:1 1 240px}\n.eco-tool__result{margin-top:16px}\n.eco-tool__subtitle{margin:0 0 10px}\n.eco-tool__cards{display:grid;gap:10px;grid-template-columns:1fr}\n@media (min-width:860px){.eco-tool__cards{grid-template-columns:1fr 1fr}}\n.eco-tool__card{border:1px solid rgba(0,0,0,.12);border-radius:12px;padding:12px}\n.eco-tool__card--wide{margin-top:10px}\n.eco-tool__metric-label{opacity:.85;font-weight:600}\n.eco-tool__metric-value{font-size:1.6em;font-weight:800;margin-top:6px;line-height:1.1}\n.eco-tool__metric-sub{opacity:.85;margin-top:6px}\n.eco-tool__bars{display:grid;gap:10px;margin-top:12px}\n.eco-tool__barrow{display:grid;grid-template-columns:140px 1fr 90px;gap:10px;align-items:center}\n@media (max-width:480px){.eco-tool__barrow{grid-template-columns:100px 1fr 70px}}\n.eco-tool__barlabel{font-weight:600;opacity:.9}\n.eco-tool__bartrack{border:1px solid rgba(0,0,0,.12);border-radius:999px;height:12px;overflow:hidden;background:rgba(0,0,0,.03)}\n.eco-tool__barfill{height:100%;width:0%;background:rgba(0,0,0,.25)}\n.eco-tool__barval{text-align:right;opacity:.85;white-space:nowrap}\n.eco-tool__note{margin:10px 0 0;opacity:.9}\n.eco-tool__muted{opacity:.8}\n.eco-tool__details{margin-top:14px}\n.eco-tool__summary{cursor:pointer;font-weight:700}\n.eco-tool__details-body{margin-top:10px}\n.eco-tool__text{margin:0 0 10px}\n.eco-tool__list{margin:0;padding-left:18px}\n<\/style>\n\n<script>\n(function(){\n  const S = \"2fa6d\";\n  const el = (id) => document.getElementById(id + \"-\" + S);\n\n  const currentEl = el(\"eco-magnetic-current\");\n  const distanceEl = el(\"eco-magnetic-distance\");\n  const unitEl = el(\"eco-magnetic-unit\");\n\n  const calcBtn = el(\"eco-magnetic-calc\");\n  const resetBtn = el(\"eco-magnetic-reset\");\n  const errorEl = el(\"eco-magnetic-error\");\n  const resultEl = el(\"eco-magnetic-result\");\n\n  const mainEl = el(\"eco-magnetic-main\");\n  const mainSubEl = el(\"eco-magnetic-main-sub\");\n  const altEl = el(\"eco-magnetic-alt\");\n  const altSubEl = el(\"eco-magnetic-alt-sub\");\n  const barsEl = el(\"eco-magnetic-bars\");\n  const tipEl = el(\"eco-magnetic-tip\");\n  const factorsEl = el(\"eco-magnetic-factors\");\n\n  const MU0 = 4 * Math.PI * 1e-7;\n\n  function setError(msg){ errorEl.textContent = msg || \"\"; }\n  function fmt(x){ return x.toLocaleString(undefined,{minimumFractionDigits:2,maximumFractionDigits:2}); }\n\n  function fillFactors(){\n    factorsEl.innerHTML = [\n      `<li><strong>Formula:<\/strong> B = \u03bc\u2080I \/ (2\u03c0r)<\/li>`,\n      `<li><strong>\u03bc\u2080:<\/strong> 4\u03c0 \u00d7 10\u207b\u2077 T\u00b7m\/A<\/li>`,\n      `<li><strong>1 mT:<\/strong> 0.001 T<\/li>`,\n      `<li><strong>1 \u00b5T:<\/strong> 0.000001 T<\/li>`\n    ].join(\"\");\n  }\n\n  function byUnit(tesla, unit){\n    if (unit === \"mt\") return { value: tesla * 1000, label: \"mT\" };\n    if (unit === \"ut\") return { value: tesla * 1000000, label: \"\u00b5T\" };\n    return { value: tesla, label: \"T\" };\n  }\n\n  function barRow(label, pct, value){\n    const p = Math.max(0, Math.min(100, pct));\n    return `\n      <div class=\"eco-tool__barrow\">\n        <div class=\"eco-tool__barlabel\">${label}<\/div>\n        <div class=\"eco-tool__bartrack\"><div class=\"eco-tool__barfill\" style=\"width:${p}%;\"><\/div><\/div>\n        <div class=\"eco-tool__barval\">${value}<\/div>\n      <\/div>\n    `;\n  }\n\n  function calculate(){\n    setError(\"\");\n\n    const current = Number(currentEl.value);\n    const distance = Number(distanceEl.value);\n    const unit = unitEl.value;\n\n    if (!Number.isFinite(current) || current < 0 || !Number.isFinite(distance) || distance <= 0){\n      setError(\"Please enter valid values.\");\n      resultEl.hidden = true;\n      return;\n    }\n\n    const tesla = (MU0 * current) \/ (2 * Math.PI * distance);\n    const display = byUnit(tesla, unit);\n    const milliTesla = tesla * 1000;\n    const microTesla = tesla * 1000000;\n\n    mainEl.textContent = `${fmt(display.value)} ${display.label}`;\n    mainSubEl.textContent = `${fmt(current)} A at ${fmt(distance)} m`;\n\n    altEl.textContent = `${fmt(microTesla)} \u00b5T`;\n    altSubEl.textContent = `${fmt(milliTesla)} mT`;\n\n    const max = Math.max(current, microTesla, 1);\n    barsEl.innerHTML = [\n      barRow(\"Current\", (current \/ max) * 100, `${fmt(current)} A`),\n      barRow(\"Distance\", Math.min((distance \/ Math.max(distance, 1)) * 100, 100), `${fmt(distance)} m`),\n      barRow(\"Field\", (microTesla \/ max) * 100, `${fmt(microTesla)} \u00b5T`)\n    ].join(\"\");\n\n    tipEl.textContent =\n      distance < 0.01\n        ? \"Tip: Magnetic field rises quickly when you get closer to the wire.\"\n        : \"Tip: Field strength decreases as distance from the wire increases.\";\n\n    resultEl.hidden = false;\n  }\n\n  function reset(){\n    setError(\"\");\n    currentEl.value = \"10\";\n    distanceEl.value = \"0.05\";\n    unitEl.value = \"ut\";\n    resultEl.hidden = true;\n  }\n\n  fillFactors();\n  unitEl.value = \"ut\";\n  calcBtn.addEventListener(\"click\", calculate);\n  resetBtn.addEventListener(\"click\", reset);\n})();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Magnetic Field Strength Calculator Calculate magnetic field strength around a straight current-carrying wire. Current(A) Electric current through the wire. Distance from wire(m) Distance from the center of the wire. Outputunit&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":2354,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"_links":{"self":[{"href":"https:\/\/science-x.net\/index.php?rest_route=\/wp\/v2\/pages\/2975"}],"collection":[{"href":"https:\/\/science-x.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/science-x.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/science-x.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/science-x.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2975"}],"version-history":[{"count":1,"href":"https:\/\/science-x.net\/index.php?rest_route=\/wp\/v2\/pages\/2975\/revisions"}],"predecessor-version":[{"id":2976,"href":"https:\/\/science-x.net\/index.php?rest_route=\/wp\/v2\/pages\/2975\/revisions\/2976"}],"up":[{"embeddable":true,"href":"https:\/\/science-x.net\/index.php?rest_route=\/wp\/v2\/pages\/2354"}],"wp:attachment":[{"href":"https:\/\/science-x.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}