[{"data":1,"prerenderedAt":1003},["ShallowReactive",2],{"guide-unit-conversion-tips":3},{"id":4,"title":5,"body":6,"date":995,"description":996,"extension":997,"meta":998,"navigation":315,"path":999,"readingTime":344,"seo":1000,"stem":1001,"__hash__":1002},"guides\u002Fguides\u002Funit-conversion-tips.md","Unit Conversion Tips: How to Convert Accurately Every Time",{"type":7,"value":8,"toc":972},"minimark",[9,14,18,27,31,34,40,51,56,62,65,69,72,150,153,157,160,165,171,174,177,181,184,189,195,199,238,242,246,371,375,391,395,398,500,504,508,511,689,693,753,757,760,827,831,920,924,931,939,942,946,968],[10,11,13],"h2",{"id":12},"why-conversion-errors-matter","Why Conversion Errors Matter",[15,16,17],"p",{},"A unit conversion mistake collapsed the Mars Climate Orbiter in 1999 — Lockheed Martin used imperial units while NASA expected metric. The $125 million probe burned up in the Martian atmosphere. Smaller errors may not make headlines, but they waste time, money, and trust.",[15,19,20,21,26],{},"Use the ",[22,23,25],"a",{"href":24},"\u002Ftools\u002Funit-converter","Unit Converter"," for instant, accurate conversions.",[10,28,30],{"id":29},"the-golden-rule-convert-in-one-step","The Golden Rule: Convert in One Step",[15,32,33],{},"The biggest source of error is chain conversion. Each intermediate step introduces rounding error.",[15,35,36],{},[37,38,39],"strong",{},"Bad — three steps:",[41,42,47],"pre",{"className":43,"code":45,"language":46},[44],"language-text","km → m → ft → in\n100 km → 100,000 m → 328,084 ft → 3,937,008 in\n","text",[48,49,45],"code",{"__ignoreMap":50},"",[15,52,53],{},[37,54,55],{},"Good — one step:",[41,57,60],{"className":58,"code":59,"language":46},[44],"km → in\n100 km × 39,370.0787 = 3,937,008 in\n",[48,61,59],{"__ignoreMap":50},[15,63,64],{},"The result is the same here, but with repeating decimals and rounding at each step, errors compound quickly.",[10,66,68],{"id":67},"use-exact-conversion-factors","Use Exact Conversion Factors",[15,70,71],{},"Some conversions are exact by definition. Prefer these over approximate values.",[73,74,75,91],"table",{},[76,77,78],"thead",{},[79,80,81,85,88],"tr",{},[82,83,84],"th",{},"Conversion",[82,86,87],{},"Exact Factor",[82,89,90],{},"Approximate (avoid)",[92,93,94,106,117,128,139],"tbody",{},[79,95,96,100,103],{},[97,98,99],"td",{},"inch → cm",[97,101,102],{},"2.54",[97,104,105],{},"2.5",[79,107,108,111,114],{},[97,109,110],{},"foot → m",[97,112,113],{},"0.3048",[97,115,116],{},"0.3",[79,118,119,122,125],{},[97,120,121],{},"pound → kg",[97,123,124],{},"0.45359237",[97,126,127],{},"0.45",[79,129,130,133,136],{},[97,131,132],{},"gallon (US) → L",[97,134,135],{},"3.785411784",[97,137,138],{},"3.8",[79,140,141,144,147],{},[97,142,143],{},"fluid oz (US) → mL",[97,145,146],{},"29.5735295625",[97,148,149],{},"30",[15,151,152],{},"When precision matters — in engineering, medicine, or finance — always use the exact factor.",[10,154,156],{"id":155},"dimensional-analysis","Dimensional Analysis",[15,158,159],{},"The most reliable conversion technique is dimensional analysis (also called the factor-label method). Write out the units and cancel them like fractions.",[15,161,162],{},[37,163,164],{},"Example: Convert 60 mph to m\u002Fs",[41,166,169],{"className":167,"code":168,"language":46},[44],"60 miles     1 hour     1 minute     1609.34 m\n--------- × --------- × ---------- × ---------- = 26.82 m\u002Fs\n   hour      60 min     60 seconds    1 mile\n",[48,170,168],{"__ignoreMap":50},[15,172,173],{},"Each fraction equals 1. The unwanted units cancel. You are left with m\u002Fs.",[15,175,176],{},"This method catches mistakes: if your units don't cancel to the desired result, you flipped a factor somewhere.",[10,178,180],{"id":179},"temperature-is-different","Temperature Is Different",[15,182,183],{},"Length, weight, and volume conversions are proportional — you multiply by a factor. Temperature has an offset, which makes it prone to a specific error.",[185,186,188],"h3",{"id":187},"the-formula","The Formula",[41,190,193],{"className":191,"code":192,"language":46},[44],"°F = °C × (9\u002F5) + 32\n°C = (°F - 32) × (5\u002F9)\n",[48,194,192],{"__ignoreMap":50},[185,196,198],{"id":197},"common-mistakes","Common Mistakes",[200,201,202,213,223],"ol",{},[203,204,205,208,209,212],"li",{},[37,206,207],{},"Forgetting the +32."," ",[48,210,211],{},"20°C × 1.8 = 36"," — but the correct answer is 68°F, not 36°F.",[203,214,215,218,219,222],{},[37,216,217],{},"Double-converting."," If you convert Celsius → Fahrenheit → Kelvin, you accumulate error. Convert directly: ",[48,220,221],{},"K = °C + 273.15",".",[203,224,225,228,229,233,234,237],{},[37,226,227],{},"Confusing Δ°C and Δ°F."," A temperature ",[230,231,232],"em",{},"change"," of 1°C equals a change of 1.8°F (no offset). A temperature ",[230,235,236],{},"reading"," of 1°C equals 33.8°F (with offset).",[10,239,241],{"id":240},"handling-precision-and-rounding","Handling Precision and Rounding",[185,243,245],{"id":244},"dont-round-intermediate-values","Don't Round Intermediate Values",[41,247,251],{"className":248,"code":249,"language":250,"meta":50,"style":50},"language-typescript shiki shiki-themes github-light github-dark","\u002F\u002F Bad — rounds at each step\nconst miles = km * 0.6214      \u002F\u002F 0.6214 is already rounded\nconst feet = miles * 5280      \u002F\u002F error compounds\n\n\u002F\u002F Good — full precision, round only at display\nconst feet = km * 3280.84      \u002F\u002F direct conversion factor\nconst display = feet.toFixed(2) \u002F\u002F round only for output\n","typescript",[48,252,253,262,289,310,317,323,342],{"__ignoreMap":50},[254,255,258],"span",{"class":256,"line":257},"line",1,[254,259,261],{"class":260},"sJ8bj","\u002F\u002F Bad — rounds at each step\n",[254,263,265,269,273,276,280,283,286],{"class":256,"line":264},2,[254,266,268],{"class":267},"szBVR","const",[254,270,272],{"class":271},"sj4cs"," miles",[254,274,275],{"class":267}," =",[254,277,279],{"class":278},"sVt8B"," km ",[254,281,282],{"class":267},"*",[254,284,285],{"class":271}," 0.6214",[254,287,288],{"class":260},"      \u002F\u002F 0.6214 is already rounded\n",[254,290,292,294,297,299,302,304,307],{"class":256,"line":291},3,[254,293,268],{"class":267},[254,295,296],{"class":271}," feet",[254,298,275],{"class":267},[254,300,301],{"class":278}," miles ",[254,303,282],{"class":267},[254,305,306],{"class":271}," 5280",[254,308,309],{"class":260},"      \u002F\u002F error compounds\n",[254,311,313],{"class":256,"line":312},4,[254,314,316],{"emptyLinePlaceholder":315},true,"\n",[254,318,320],{"class":256,"line":319},5,[254,321,322],{"class":260},"\u002F\u002F Good — full precision, round only at display\n",[254,324,326,328,330,332,334,336,339],{"class":256,"line":325},6,[254,327,268],{"class":267},[254,329,296],{"class":271},[254,331,275],{"class":267},[254,333,279],{"class":278},[254,335,282],{"class":267},[254,337,338],{"class":271}," 3280.84",[254,340,341],{"class":260},"      \u002F\u002F direct conversion factor\n",[254,343,345,347,350,352,355,359,362,365,368],{"class":256,"line":344},7,[254,346,268],{"class":267},[254,348,349],{"class":271}," display",[254,351,275],{"class":267},[254,353,354],{"class":278}," feet.",[254,356,358],{"class":357},"sScJk","toFixed",[254,360,361],{"class":278},"(",[254,363,364],{"class":271},"2",[254,366,367],{"class":278},") ",[254,369,370],{"class":260},"\u002F\u002F round only for output\n",[185,372,374],{"id":373},"know-your-significant-figures","Know Your Significant Figures",[376,377,378,381,388],"ul",{},[203,379,380],{},"Input precision determines output precision.",[203,382,383,384,387],{},"Converting 5 km to miles: ",[48,385,386],{},"5 × 0.6214 = 3.107"," → report as 3.1 (one significant figure matches the input).",[203,389,390],{},"Converting 5.000 km: report all four significant figures.",[185,392,394],{"id":393},"use-decimal-libraries-for-money","Use Decimal Libraries for Money",[15,396,397],{},"Floating-point arithmetic causes errors in financial calculations. Use a decimal library:",[41,399,401],{"className":248,"code":400,"language":250,"meta":50,"style":50},"import Decimal from 'decimal.js'\n\n\u002F\u002F Bad\nconst euro = 99.99 * 0.9188  \u002F\u002F 91.870812 — floating point issues\n\n\u002F\u002F Good\nconst euro = new Decimal('99.99').times('0.9188').toFixed(2) \u002F\u002F \"91.87\"\n",[48,402,403,418,422,427,448,452,457],{"__ignoreMap":50},[254,404,405,408,411,414],{"class":256,"line":257},[254,406,407],{"class":267},"import",[254,409,410],{"class":278}," Decimal ",[254,412,413],{"class":267},"from",[254,415,417],{"class":416},"sZZnC"," 'decimal.js'\n",[254,419,420],{"class":256,"line":264},[254,421,316],{"emptyLinePlaceholder":315},[254,423,424],{"class":256,"line":291},[254,425,426],{"class":260},"\u002F\u002F Bad\n",[254,428,429,431,434,436,439,442,445],{"class":256,"line":312},[254,430,268],{"class":267},[254,432,433],{"class":271}," euro",[254,435,275],{"class":267},[254,437,438],{"class":271}," 99.99",[254,440,441],{"class":267}," *",[254,443,444],{"class":271}," 0.9188",[254,446,447],{"class":260},"  \u002F\u002F 91.870812 — floating point issues\n",[254,449,450],{"class":256,"line":319},[254,451,316],{"emptyLinePlaceholder":315},[254,453,454],{"class":256,"line":325},[254,455,456],{"class":260},"\u002F\u002F Good\n",[254,458,459,461,463,465,468,471,473,476,479,482,484,487,489,491,493,495,497],{"class":256,"line":344},[254,460,268],{"class":267},[254,462,433],{"class":271},[254,464,275],{"class":267},[254,466,467],{"class":267}," new",[254,469,470],{"class":357}," Decimal",[254,472,361],{"class":278},[254,474,475],{"class":416},"'99.99'",[254,477,478],{"class":278},").",[254,480,481],{"class":357},"times",[254,483,361],{"class":278},[254,485,486],{"class":416},"'0.9188'",[254,488,478],{"class":278},[254,490,358],{"class":357},[254,492,361],{"class":278},[254,494,364],{"class":271},[254,496,367],{"class":278},[254,498,499],{"class":260},"\u002F\u002F \"91.87\"\n",[10,501,503],{"id":502},"programming-tips","Programming Tips",[185,505,507],{"id":506},"store-in-a-canonical-unit","Store in a Canonical Unit",[15,509,510],{},"Always store data in one unit system (preferably metric\u002FSI). Convert only at the display layer.",[41,512,514],{"className":248,"code":513,"language":250,"meta":50,"style":50},"interface Distance {\n  value: number    \u002F\u002F always in meters\n  unit: 'm'\n}\n\nfunction display(d: Distance, locale: string): string {\n  if (locale === 'en-US') {\n    return `${(d.value * 3.28084).toFixed(1)} ft`\n  }\n  return `${d.value.toFixed(1)} m`\n}\n",[48,515,516,527,542,552,557,561,597,614,651,657,684],{"__ignoreMap":50},[254,517,518,521,524],{"class":256,"line":257},[254,519,520],{"class":267},"interface",[254,522,523],{"class":357}," Distance",[254,525,526],{"class":278}," {\n",[254,528,529,533,536,539],{"class":256,"line":264},[254,530,532],{"class":531},"s4XuR","  value",[254,534,535],{"class":267},":",[254,537,538],{"class":271}," number",[254,540,541],{"class":260},"    \u002F\u002F always in meters\n",[254,543,544,547,549],{"class":256,"line":291},[254,545,546],{"class":531},"  unit",[254,548,535],{"class":267},[254,550,551],{"class":416}," 'm'\n",[254,553,554],{"class":256,"line":312},[254,555,556],{"class":278},"}\n",[254,558,559],{"class":256,"line":319},[254,560,316],{"emptyLinePlaceholder":315},[254,562,563,566,568,570,573,575,577,580,583,585,588,591,593,595],{"class":256,"line":325},[254,564,565],{"class":267},"function",[254,567,349],{"class":357},[254,569,361],{"class":278},[254,571,572],{"class":531},"d",[254,574,535],{"class":267},[254,576,523],{"class":357},[254,578,579],{"class":278},", ",[254,581,582],{"class":531},"locale",[254,584,535],{"class":267},[254,586,587],{"class":271}," string",[254,589,590],{"class":278},")",[254,592,535],{"class":267},[254,594,587],{"class":271},[254,596,526],{"class":278},[254,598,599,602,605,608,611],{"class":256,"line":344},[254,600,601],{"class":267},"  if",[254,603,604],{"class":278}," (locale ",[254,606,607],{"class":267},"===",[254,609,610],{"class":416}," 'en-US'",[254,612,613],{"class":278},") {\n",[254,615,617,620,623,625,627,629,632,634,637,639,641,643,646,648],{"class":256,"line":616},8,[254,618,619],{"class":267},"    return",[254,621,622],{"class":416}," `${",[254,624,361],{"class":416},[254,626,572],{"class":278},[254,628,222],{"class":416},[254,630,631],{"class":278},"value",[254,633,441],{"class":267},[254,635,636],{"class":271}," 3.28084",[254,638,478],{"class":416},[254,640,358],{"class":357},[254,642,361],{"class":416},[254,644,645],{"class":271},"1",[254,647,590],{"class":416},[254,649,650],{"class":416},"} ft`\n",[254,652,654],{"class":256,"line":653},9,[254,655,656],{"class":278},"  }\n",[254,658,660,663,665,667,669,671,673,675,677,679,681],{"class":256,"line":659},10,[254,661,662],{"class":267},"  return",[254,664,622],{"class":416},[254,666,572],{"class":278},[254,668,222],{"class":416},[254,670,631],{"class":278},[254,672,222],{"class":416},[254,674,358],{"class":357},[254,676,361],{"class":416},[254,678,645],{"class":271},[254,680,590],{"class":416},[254,682,683],{"class":416},"} m`\n",[254,685,687],{"class":256,"line":686},11,[254,688,556],{"class":278},[185,690,692],{"id":691},"define-constants-not-magic-numbers","Define Constants, Not Magic Numbers",[41,694,696],{"className":248,"code":695,"language":250,"meta":50,"style":50},"\u002F\u002F Bad\nconst result = value * 2.54\n\n\u002F\u002F Good\nconst INCHES_PER_CENTIMETER = 2.54\nconst result = value * INCHES_PER_CENTIMETER\n",[48,697,698,702,719,723,727,738],{"__ignoreMap":50},[254,699,700],{"class":256,"line":257},[254,701,426],{"class":260},[254,703,704,706,709,711,714,716],{"class":256,"line":264},[254,705,268],{"class":267},[254,707,708],{"class":271}," result",[254,710,275],{"class":267},[254,712,713],{"class":278}," value ",[254,715,282],{"class":267},[254,717,718],{"class":271}," 2.54\n",[254,720,721],{"class":256,"line":291},[254,722,316],{"emptyLinePlaceholder":315},[254,724,725],{"class":256,"line":312},[254,726,456],{"class":260},[254,728,729,731,734,736],{"class":256,"line":319},[254,730,268],{"class":267},[254,732,733],{"class":271}," INCHES_PER_CENTIMETER",[254,735,275],{"class":267},[254,737,718],{"class":271},[254,739,740,742,744,746,748,750],{"class":256,"line":325},[254,741,268],{"class":267},[254,743,708],{"class":271},[254,745,275],{"class":267},[254,747,713],{"class":278},[254,749,282],{"class":267},[254,751,752],{"class":271}," INCHES_PER_CENTIMETER\n",[185,754,756],{"id":755},"beware-of-integer-overflow","Beware of Integer Overflow",[15,758,759],{},"Converting large values can overflow 32-bit integers:",[41,761,763],{"className":248,"code":762,"language":250,"meta":50,"style":50},"\u002F\u002F 50,000 km in mm overflows 32-bit int\nconst mm = 50000 * 1_000_000  \u002F\u002F 50,000,000,000 — exceeds 2^31\n\n\u002F\u002F Use BigInt or keep in larger units\nconst mm = BigInt(50000) * 1_000_000n  \u002F\u002F safe\n",[48,764,765,770,790,794,799],{"__ignoreMap":50},[254,766,767],{"class":256,"line":257},[254,768,769],{"class":260},"\u002F\u002F 50,000 km in mm overflows 32-bit int\n",[254,771,772,774,777,779,782,784,787],{"class":256,"line":264},[254,773,268],{"class":267},[254,775,776],{"class":271}," mm",[254,778,275],{"class":267},[254,780,781],{"class":271}," 50000",[254,783,441],{"class":267},[254,785,786],{"class":271}," 1_000_000",[254,788,789],{"class":260},"  \u002F\u002F 50,000,000,000 — exceeds 2^31\n",[254,791,792],{"class":256,"line":291},[254,793,316],{"emptyLinePlaceholder":315},[254,795,796],{"class":256,"line":312},[254,797,798],{"class":260},"\u002F\u002F Use BigInt or keep in larger units\n",[254,800,801,803,805,807,810,812,815,817,819,821,824],{"class":256,"line":319},[254,802,268],{"class":267},[254,804,776],{"class":271},[254,806,275],{"class":267},[254,808,809],{"class":357}," BigInt",[254,811,361],{"class":278},[254,813,814],{"class":271},"50000",[254,816,367],{"class":278},[254,818,282],{"class":267},[254,820,786],{"class":271},[254,822,823],{"class":267},"n",[254,825,826],{"class":260},"  \u002F\u002F safe\n",[10,828,830],{"id":829},"common-conversion-mistakes","Common Conversion Mistakes",[73,832,833,846],{},[76,834,835],{},[79,836,837,840,843],{},[82,838,839],{},"Mistake",[82,841,842],{},"Example",[82,844,845],{},"Fix",[92,847,848,864,875,886,903],{},[79,849,850,853,859],{},[97,851,852],{},"Wrong factor direction",[97,854,855,858],{},[48,856,857],{},"kg × 2.205"," to get kg from lb",[97,860,861],{},[48,862,863],{},"lb × 0.4536 = kg",[79,865,866,869,872],{},[97,867,868],{},"Confusing mass vs weight",[97,870,871],{},"Treating \"pound-force\" as \"pound-mass\"",[97,873,874],{},"Know your context (physics vs daily use)",[79,876,877,880,883],{},[97,878,879],{},"Mixing US and UK volumes",[97,881,882],{},"Using US gallon for a UK recipe",[97,884,885],{},"Check the source country",[79,887,888,891,897],{},[97,889,890],{},"Area confusion",[97,892,893,896],{},[48,894,895],{},"1 m² ≠ 3.28 ft²"," (it's 10.76 ft²)",[97,898,899,900],{},"Square the linear factor: ",[48,901,902],{},"(3.28084)² = 10.7639",[79,904,905,908,914],{},[97,906,907],{},"Cubic confusion",[97,909,910,913],{},[48,911,912],{},"1 m³ ≠ 35.31 ft³"," (it IS 35.31 ft³)",[97,915,916,917],{},"Cube the linear factor: ",[48,918,919],{},"(3.28084)³ = 35.3147",[10,921,923],{"id":922},"quick-reference-squared-and-cubed-units","Quick Reference: Squared and Cubed Units",[15,925,926,927,930],{},"When converting area (²) or volume (³), you must ",[37,928,929],{},"square or cube"," the linear conversion factor.",[376,932,933,936],{},[203,934,935],{},"1 m = 3.28084 ft → 1 m² = (3.28084)² ft² = 10.7639 ft²",[203,937,938],{},"1 m = 3.28084 ft → 1 m³ = (3.28084)³ ft³ = 35.3147 ft³",[15,940,941],{},"Forgetting this is one of the most common — and most expensive — conversion errors.",[10,943,945],{"id":944},"related-resources","Related Resources",[376,947,948,955,962],{},[203,949,950,954],{},[22,951,953],{"href":952},"\u002Fguides\u002Fmetric-vs-imperial","Metric vs Imperial: Complete Conversion Guide"," — full comparison table",[203,956,957,961],{},[22,958,960],{"href":959},"\u002Fcheat-sheets\u002Funit-conversion","Unit Conversion Cheat Sheet"," — printable reference",[203,963,964,967],{},[22,965,966],{"href":24},"Unit Converter Tool"," — instant browser-based conversions",[969,970,971],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":50,"searchDepth":264,"depth":264,"links":973},[974,975,976,977,978,982,987,992,993,994],{"id":12,"depth":264,"text":13},{"id":29,"depth":264,"text":30},{"id":67,"depth":264,"text":68},{"id":155,"depth":264,"text":156},{"id":179,"depth":264,"text":180,"children":979},[980,981],{"id":187,"depth":291,"text":188},{"id":197,"depth":291,"text":198},{"id":240,"depth":264,"text":241,"children":983},[984,985,986],{"id":244,"depth":291,"text":245},{"id":373,"depth":291,"text":374},{"id":393,"depth":291,"text":394},{"id":502,"depth":264,"text":503,"children":988},[989,990,991],{"id":506,"depth":291,"text":507},{"id":691,"depth":291,"text":692},{"id":755,"depth":291,"text":756},{"id":829,"depth":264,"text":830},{"id":922,"depth":264,"text":923},{"id":944,"depth":264,"text":945},"2026-05-26","Practical tips for accurate unit conversion. Avoid common errors, maintain precision, and convert confidently in code and daily life.","md",{"immutable":315},"\u002Fguides\u002Funit-conversion-tips",{"title":5,"description":996},"guides\u002Funit-conversion-tips","9tCjg9ZgOVSZjwbNYuXJxrkqgW82CnunPfGiJhEGfh4",1780401324765]