{"id":775,"date":"2026-06-22T11:37:42","date_gmt":"2026-06-22T11:37:42","guid":{"rendered":"https:\/\/silcom.io\/?page_id=775"},"modified":"2026-06-22T11:54:45","modified_gmt":"2026-06-22T11:54:45","slug":"convert","status":"publish","type":"page","link":"https:\/\/silcom.io\/?page_id=775","title":{"rendered":"Convert"},"content":{"rendered":"\t<section class=\"silcom-currency-tool\" data-silcom-currency-tool>\n\t\t<div class=\"silcom-currency-tool__inner\">\n\t\t\t<nav class=\"silcom-currency-tool__breadcrumb\" aria-label=\"Breadcrumb\">\n\t\t\t\t<a href=\"https:\/\/silcom.io\/\">Home<\/a>\n\t\t\t\t<span aria-hidden=\"true\">\/<\/span>\n\t\t\t\t<span>Convert<\/span>\n\t\t\t<\/nav>\n\t\t\t<div class=\"silcom-currency-tool__header\">\n\t\t\t\t<p>Silcom Tools<\/p>\n\t\t\t\t<h1>Convert<\/h1>\n\t\t\t\t<span>Convert currencies, everyday units, and calculator expressions from one focused tools page. Your searches stay on your device.<\/span>\n\t\t\t<\/div>\n\t\t\t<div class=\"silcom-currency-tool__section-heading\">\n\t\t\t\t<p>Currency<\/p>\n\t\t\t\t<h2>Currency converter<\/h2>\n\t\t\t<\/div>\n\t\t\t<form class=\"silcom-currency-tool__card\" data-currency-form>\n\t\t\t\t<div class=\"silcom-currency-tool__amount\">\n\t\t\t\t\t<label for=\"silcom-currency-amount\">Amount<\/label>\n\t\t\t\t\t<input id=\"silcom-currency-amount\" type=\"number\" min=\"0\" step=\"0.01\" value=\"100\" data-currency-amount>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"silcom-currency-tool__fields\">\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<span>From currency<\/span>\n\t\t\t\t\t\t<input type=\"search\" value=\"AUD\" autocomplete=\"off\" list=\"silcom-currency-options\" data-currency-from>\n\t\t\t\t\t\t<div class=\"silcom-currency-tool__suggestions\" data-currency-from-suggestions><\/div>\n\t\t\t\t\t<\/label>\n\t\t\t\t\t<button class=\"silcom-currency-tool__swap\" type=\"button\" aria-label=\"Swap currencies\" data-currency-swap>&#8646;<\/button>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<span>To currency<\/span>\n\t\t\t\t\t\t<input type=\"search\" value=\"NZD\" autocomplete=\"off\" list=\"silcom-currency-options\" data-currency-to>\n\t\t\t\t\t\t<div class=\"silcom-currency-tool__suggestions\" data-currency-to-suggestions><\/div>\n\t\t\t\t\t<\/label>\n\t\t\t\t<\/div>\n\t\t\t\t<datalist id=\"silcom-currency-options\" data-currency-options><\/datalist>\n\t\t\t\t<button class=\"silcom-currency-tool__convert\" type=\"submit\">Convert<\/button>\n\t\t\t<\/form>\n\t\t\t<section class=\"silcom-currency-tool__result\" aria-live=\"polite\">\n\t\t\t\t<p data-currency-note>Choose currencies and enter an amount.<\/p>\n\t\t\t\t<strong data-currency-main>Ready to convert<\/strong>\n\t\t\t\t<div data-currency-detail>Suggestions accept currency code, currency name, or country-style terms.<\/div>\n\t\t\t<\/section>\n\t\t\t<section class=\"silcom-currency-tool__card silcom-currency-tool__unit\" data-unit-converter>\n\t\t\t\t<div class=\"silcom-currency-tool__section-heading silcom-currency-tool__section-heading--inside\">\n\t\t\t\t\t<p>Units<\/p>\n\t\t\t\t\t<h2>Unit converter<\/h2>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"silcom-currency-tool__unit-grid\">\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<span>Amount<\/span>\n\t\t\t\t\t\t<input type=\"number\" step=\"any\" value=\"1000\" data-unit-amount>\n\t\t\t\t\t<\/label>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<span>Category<\/span>\n\t\t\t\t\t\t<select data-unit-category>\n\t\t\t\t\t\t\t<option value=\"length\">Length<\/option>\n\t\t\t\t\t\t\t<option value=\"area\">Area<\/option>\n\t\t\t\t\t\t\t<option value=\"volume\">Volume<\/option>\n\t\t\t\t\t\t\t<option value=\"mass\">Weight \/ mass<\/option>\n\t\t\t\t\t\t\t<option value=\"speed\">Speed<\/option>\n\t\t\t\t\t\t\t<option value=\"time\">Time<\/option>\n\t\t\t\t\t\t\t<option value=\"pressure\">Pressure<\/option>\n\t\t\t\t\t\t\t<option value=\"power\">Power<\/option>\n\t\t\t\t\t\t\t<option value=\"energy\">Energy<\/option>\n\t\t\t\t\t\t\t<option value=\"data\">Data storage<\/option>\n\t\t\t\t\t\t\t<option value=\"dataRate\">Data transfer rate<\/option>\n\t\t\t\t\t\t\t<option value=\"temperature\">Temperature<\/option>\n\t\t\t\t\t\t<\/select>\n\t\t\t\t\t<\/label>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<span>From unit<\/span>\n\t\t\t\t\t\t<select data-unit-from><\/select>\n\t\t\t\t\t<\/label>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<span>To unit<\/span>\n\t\t\t\t\t\t<select data-unit-to><\/select>\n\t\t\t\t\t<\/label>\n\t\t\t\t\t<button class=\"silcom-currency-tool__swap\" type=\"button\" aria-label=\"Swap units\" data-unit-swap>&#8646;<\/button>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"silcom-currency-tool__mini-result\" aria-live=\"polite\">\n\t\t\t\t\t<strong data-unit-result>Ready<\/strong>\n\t\t\t\t\t<span data-unit-detail>Choose units to convert.<\/span>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"silcom-currency-tool__facts\" data-unit-facts>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<p>Extreme facts<\/p>\n\t\t\t\t\t\t<h3 data-unit-facts-title>Measurement context<\/h3>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<ul data-unit-facts-list><\/ul>\n\t\t\t\t<\/div>\n\t\t\t<\/section>\n\t\t<\/div>\n\t<\/section>\n\t<script>\n\t(function(){\n\t\tvar root=document.querySelector('[data-silcom-currency-tool]'); if(!root)return;\n\t\tvar form=root.querySelector('[data-currency-form]'), amount=root.querySelector('[data-currency-amount]'), from=root.querySelector('[data-currency-from]'), to=root.querySelector('[data-currency-to]'), swap=root.querySelector('[data-currency-swap]'), options=root.querySelector('[data-currency-options]'), fromSuggestions=root.querySelector('[data-currency-from-suggestions]'), toSuggestions=root.querySelector('[data-currency-to-suggestions]'), note=root.querySelector('[data-currency-note]'), main=root.querySelector('[data-currency-main]'), detail=root.querySelector('[data-currency-detail]');\n\t\tvar unitAmount=root.querySelector('[data-unit-amount]'), unitCategory=root.querySelector('[data-unit-category]'), unitFrom=root.querySelector('[data-unit-from]'), unitTo=root.querySelector('[data-unit-to]'), unitSwap=root.querySelector('[data-unit-swap]'), unitResult=root.querySelector('[data-unit-result]'), unitDetail=root.querySelector('[data-unit-detail]'), unitFactsTitle=root.querySelector('[data-unit-facts-title]'), unitFactsList=root.querySelector('[data-unit-facts-list]');\n\t\tvar storageKey='silcom.currencyConverter.v1', apiBase='https:\/\/api.frankfurter.dev\/v2';\n\t\tvar unitStorageKey='silcom.convertUnits.v1';\n\t\tvar fallbackCurrencies={\n\t\t\tAUD:'Australian Dollar', NZD:'New Zealand Dollar', USD:'United States Dollar', CAD:'Canadian Dollar', GBP:'British Pound', EUR:'Euro', JPY:'Japanese Yen', CNY:'Chinese Yuan', HKD:'Hong Kong Dollar', SGD:'Singapore Dollar', INR:'Indian Rupee', AED:'United Arab Emirates Dirham', CHF:'Swiss Franc', ZAR:'South African Rand', BRL:'Brazilian Real', MXN:'Mexican Peso', KRW:'South Korean Won', THB:'Thai Baht', MYR:'Malaysian Ringgit', PHP:'Philippine Peso', IDR:'Indonesian Rupiah', FJD:'Fijian Dollar', WST:'Samoan Tala', TOP:'Tongan Paanga', XPF:'CFP Franc'\n\t\t};\n\t\tvar aliases={\n\t\t\tAUD:'australia australian aussie dollar', NZD:'new zealand kiwi dollar aotearoa', USD:'united states america us dollar usa', CAD:'canada canadian dollar', GBP:'uk united kingdom britain england scotland wales pound sterling', EUR:'euro europe european union', JPY:'japan japanese yen', CNY:'china chinese yuan renminbi', HKD:'hong kong dollar', SGD:'singapore dollar', INR:'india indian rupee', AED:'uae dubai emirates dirham', CHF:'switzerland swiss franc', ZAR:'south africa rand', BRL:'brazil real', MXN:'mexico peso', KRW:'south korea korean won', THB:'thailand baht', MYR:'malaysia ringgit', PHP:'philippines peso', IDR:'indonesia rupiah', FJD:'fiji dollar', WST:'samoa tala', TOP:'tonga paanga', XPF:'pacific franc french polynesia new caledonia'\n\t\t};\n\t\tvar currencies=Object.assign({},fallbackCurrencies);\n\t\tfunction readMemory(){try{return JSON.parse(localStorage.getItem(storageKey)||'{}')||{};}catch(e){return{};}}\n\t\tfunction writeMemory(data){try{localStorage.setItem(storageKey,JSON.stringify(Object.assign(readMemory(),data)));}catch(e){}}\n\t\tfunction esc(text){return String(text).replace(\/[&<>\"']\/g,function(c){return({'&':'&amp;','<':'&lt;','>':'&gt;','\"':'&quot;',\"'\":'&#039;'})[c];});}\n\t\tfunction currencyList(){return Object.keys(currencies).sort().map(function(code){return{code:code,name:currencies[code],search:(code+' '+currencies[code]+' '+(aliases[code]||'')).toLowerCase()};});}\n\t\tfunction findCurrency(query){var needle=query.trim().toLowerCase(); if(!needle)return null; var exact=currencyList().find(function(item){return item.code.toLowerCase()===needle;}); return exact||currencyList().find(function(item){return item.name.toLowerCase()===needle;})||currencyList().find(function(item){return item.search.indexOf(needle)>-1;})||null;}\n\t\tfunction matches(query){var needle=query.trim().toLowerCase(); return currencyList().filter(function(item){return !needle||item.search.indexOf(needle)>-1;}).sort(function(a,b){var aStart=needle&&(a.code.toLowerCase().indexOf(needle)===0||a.name.toLowerCase().indexOf(needle)===0)?0:1, bStart=needle&&(b.code.toLowerCase().indexOf(needle)===0||b.name.toLowerCase().indexOf(needle)===0)?0:1; return aStart-bStart||a.code.localeCompare(b.code);}).slice(0,7);}\n\t\tfunction renderSuggestions(wrap,items){if(!items.length){wrap.innerHTML='<span>No match yet<\/span>'; return;} wrap.innerHTML=items.map(function(item){return '<button type=\"button\" data-currency-suggestion=\"'+esc(item.code)+'\"><strong>'+esc(item.code)+'<\/strong><span>'+esc(item.name)+'<\/span><\/button>';}).join('');}\n\t\tfunction refreshSuggestions(){renderSuggestions(fromSuggestions,matches(from.value)); renderSuggestions(toSuggestions,matches(to.value)); options.innerHTML=currencyList().map(function(item){return '<option value=\"'+esc(item.code)+'\">'+esc(item.name)+'<\/option>';}).join('');}\n\t\tfunction money(value,code){try{return new Intl.NumberFormat([], {style:'currency',currency:code,maximumFractionDigits:2}).format(value);}catch(e){return value.toFixed(2)+' '+code;}}\n\t\tfunction remember(){writeMemory({amount:amount.value,from:from.value,to:to.value});}\n\t\tfunction setMessage(kind,text){note.textContent=kind; detail.textContent=text;}\n\t\tfunction convert(){var fromCurrency=findCurrency(from.value), toCurrency=findCurrency(to.value), raw=parseFloat(amount.value||'0'), amp=String.fromCharCode(38); refreshSuggestions(); if(!fromCurrency){main.textContent='Choose a valid source currency'; setMessage('Validation needed','Pick the source from the suggestions by code, currency name, or country-style search.'); return;} if(!toCurrency){main.textContent='Choose a valid destination currency'; setMessage('Validation needed','Pick the destination from the suggestions by code, currency name, or country-style search.'); return;} if(!Number.isFinite(raw)||raw<0){main.textContent='Enter a valid amount'; setMessage('Validation needed','The amount must be zero or higher.'); return;} from.value=fromCurrency.code; to.value=toCurrency.code; remember(); if(fromCurrency.code===toCurrency.code){main.textContent=money(raw,toCurrency.code); setMessage('Same currency','No conversion needed.'); return;} main.textContent='Checking live rate...'; detail.textContent='Fetching the latest available rate.'; fetch(apiBase+'\/rates?base='+encodeURIComponent(fromCurrency.code)+amp+'quotes='+encodeURIComponent(toCurrency.code)).then(function(response){if(!response.ok)throw new Error('Rate service unavailable.'); return response.json();}).then(function(data){var row=Array.isArray(data)?data[0]:null, rate=row?Number(row.rate):data?data.rates?Number(data.rates[toCurrency.code]):NaN:NaN, rateDate=row?row.date:data?data.date:''; if(!Number.isFinite(rate))throw new Error('Rate not available for this pair.'); var converted=raw*rate; main.textContent=money(converted,toCurrency.code); note.textContent=money(raw,fromCurrency.code)+' = '+money(converted,toCurrency.code); detail.textContent='1 '+fromCurrency.code+' = '+rate.toFixed(6)+' '+toCurrency.code+' \u00b7 latest available rate'+(rateDate?' for '+rateDate:'')+'.';}).catch(function(error){main.textContent='Live rate unavailable'; detail.textContent=(error?error.message?error.message:'Could not fetch the rate.':'Could not fetch the rate.')+' Try again when online.'; note.textContent='Currency pair: '+fromCurrency.code+' to '+toCurrency.code;});}\n\t\tvar memory=readMemory(); if(memory.amount)amount.value=memory.amount; if(memory.from)from.value=memory.from; if(memory.to)to.value=memory.to;\n\t\trefreshSuggestions();\n\t\tfetch(apiBase+'\/currencies').then(function(response){return response.ok?response.json():null;}).then(function(data){var fetched={}; if(Array.isArray(data)){data.forEach(function(item){if(item.iso_code){if(item.name)fetched[item.iso_code]=item.name;}});}else if(data){if(typeof data==='object')fetched=data;} if(Object.keys(fetched).length){currencies=Object.assign({},fallbackCurrencies,fetched); refreshSuggestions(); convert();}}).catch(function(){refreshSuggestions();});\n\t\tfrom.addEventListener('input',refreshSuggestions);\n\t\tto.addEventListener('input',refreshSuggestions);\n\t\tamount.addEventListener('input',remember);\n\t\troot.addEventListener('click',function(event){var button=event.target.closest('[data-currency-suggestion]'); if(!button||!root.contains(button))return; var code=button.getAttribute('data-currency-suggestion')||''; if(button.closest('[data-currency-from-suggestions]'))from.value=code; if(button.closest('[data-currency-to-suggestions]'))to.value=code; convert();});\n\t\tswap.addEventListener('click',function(){var oldFrom=from.value; from.value=to.value; to.value=oldFrom; convert();});\n\t\tform.addEventListener('submit',function(event){event.preventDefault(); convert();});\n\t\tconvert();\n\t\tvar unitSets={\n\t\t\tlength:[\n\t\t\t\t{code:'mm',label:'Millimetre',factor:0.001},{code:'cm',label:'Centimetre',factor:0.01},{code:'m',label:'Metre',factor:1},{code:'km',label:'Kilometre',factor:1000},{code:'in',label:'Inch',factor:0.0254},{code:'ft',label:'Foot',factor:0.3048},{code:'yd',label:'Yard',factor:0.9144},{code:'mi',label:'Mile',factor:1609.344}\n\t\t\t],\n\t\t\tarea:[\n\t\t\t\t{code:'mm2',label:'Square millimetre',factor:0.000001},{code:'cm2',label:'Square centimetre',factor:0.0001},{code:'m2',label:'Square metre',factor:1},{code:'km2',label:'Square kilometre',factor:1000000},{code:'in2',label:'Square inch',factor:0.00064516},{code:'ft2',label:'Square foot',factor:0.09290304},{code:'yd2',label:'Square yard',factor:0.83612736},{code:'acre',label:'Acre',factor:4046.8564224},{code:'ha',label:'Hectare',factor:10000}\n\t\t\t],\n\t\t\tvolume:[\n\t\t\t\t{code:'ml',label:'Millilitre',factor:0.001},{code:'l',label:'Litre',factor:1},{code:'m3',label:'Cubic metre',factor:1000},{code:'tsp',label:'Teaspoon',factor:0.00492892159375},{code:'tbsp',label:'Tablespoon',factor:0.01478676478125},{code:'cup',label:'Cup',factor:0.24},{code:'floz',label:'Fluid ounce',factor:0.0295735295625},{code:'pt',label:'Pint',factor:0.473176473},{code:'qt',label:'Quart',factor:0.946352946},{code:'gal',label:'Gallon',factor:3.785411784}\n\t\t\t],\n\t\t\tmass:[\n\t\t\t\t{code:'mg',label:'Milligram',factor:0.000001},{code:'g',label:'Gram',factor:0.001},{code:'kg',label:'Kilogram',factor:1},{code:'t',label:'Tonne',factor:1000},{code:'oz',label:'Ounce',factor:0.028349523125},{code:'lb',label:'Pound',factor:0.45359237}\n\t\t\t],\n\t\t\tspeed:[\n\t\t\t\t{code:'m\/s',label:'Metre per second',factor:1},{code:'km\/h',label:'Kilometre per hour',factor:0.27777777777778},{code:'mph',label:'Mile per hour',factor:0.44704},{code:'ft\/s',label:'Foot per second',factor:0.3048},{code:'knot',label:'Knot',factor:0.51444444444444}\n\t\t\t],\n\t\t\ttime:[\n\t\t\t\t{code:'ms',label:'Millisecond',factor:0.001},{code:'s',label:'Second',factor:1},{code:'min',label:'Minute',factor:60},{code:'h',label:'Hour',factor:3600},{code:'day',label:'Day',factor:86400},{code:'week',label:'Week',factor:604800},{code:'month',label:'Month (30 days)',factor:2592000},{code:'year',label:'Year (365 days)',factor:31536000}\n\t\t\t],\n\t\t\tpressure:[\n\t\t\t\t{code:'Pa',label:'Pascal',factor:1},{code:'kPa',label:'Kilopascal',factor:1000},{code:'MPa',label:'Megapascal',factor:1000000},{code:'bar',label:'Bar',factor:100000},{code:'mbar',label:'Millibar',factor:100},{code:'psi',label:'Pound per square inch',factor:6894.757293168},{code:'atm',label:'Atmosphere',factor:101325}\n\t\t\t],\n\t\t\tpower:[\n\t\t\t\t{code:'W',label:'Watt',factor:1},{code:'kW',label:'Kilowatt',factor:1000},{code:'MW',label:'Megawatt',factor:1000000},{code:'hp',label:'Horsepower',factor:745.69987158227},{code:'BTU\/h',label:'BTU per hour',factor:0.29307107}\n\t\t\t],\n\t\t\tenergy:[\n\t\t\t\t{code:'J',label:'Joule',factor:1},{code:'kJ',label:'Kilojoule',factor:1000},{code:'MJ',label:'Megajoule',factor:1000000},{code:'cal',label:'Calorie',factor:4.184},{code:'kcal',label:'Kilocalorie',factor:4184},{code:'Wh',label:'Watt hour',factor:3600},{code:'kWh',label:'Kilowatt hour',factor:3600000},{code:'BTU',label:'British thermal unit',factor:1055.05585262}\n\t\t\t],\n\t\t\tdata:[\n\t\t\t\t{code:'B',label:'Byte',factor:1},{code:'KB',label:'Kilobyte - decimal',factor:1000},{code:'KiB',label:'Kilobyte - binary',factor:1024},{code:'MB',label:'Megabyte - decimal',factor:1000000},{code:'MiB',label:'Megabyte - binary',factor:1048576},{code:'GB',label:'Gigabyte - decimal',factor:1000000000},{code:'GiB',label:'Gigabyte - binary',factor:1073741824},{code:'TB',label:'Terabyte - decimal',factor:1000000000000},{code:'TiB',label:'Terabyte - binary',factor:1099511627776},{code:'PB',label:'Petabyte - decimal',factor:1000000000000000},{code:'PiB',label:'Petabyte - binary',factor:1125899906842624}\n\t\t\t],\n\t\t\tdataRate:[\n\t\t\t\t{code:'bps',label:'Bit per second',factor:1},{code:'Kbps',label:'Kilobit per second',factor:1000},{code:'Mbps',label:'Megabit per second',factor:1000000},{code:'Gbps',label:'Gigabit per second',factor:1000000000},{code:'B\/s',label:'Byte per second',factor:8},{code:'KB\/s',label:'Kilobyte per second',factor:8000},{code:'MB\/s',label:'Megabyte per second',factor:8000000},{code:'GB\/s',label:'Gigabyte per second',factor:8000000000}\n\t\t\t],\n\t\t\ttemperature:[\n\t\t\t\t{code:'C',label:'Celsius'},{code:'F',label:'Fahrenheit'},{code:'K',label:'Kelvin'}\n\t\t\t]\n\t\t};\n\t\tvar unitFacts={\n\t\t\tlength:{title:'Length: extreme scale checks',items:['Speed of light: light crosses about 299,792 km in one second in vacuum.','Earth diameter: about 12,742 km from one side of the planet to the other.','Mariana Trench depth: about 10.9 km below sea level.','Olympic swimming pool: exactly 50 m long.','Tokyo compact room width can be only around 2.5 to 3 m, which makes centimetres suddenly matter.']},\n\t\t\tarea:{title:'Area: from rooms to planets',items:['Earth surface area: about 510 million km2.','Australia land area: about 7.7 million km2.','A football pitch is usually around 7,000 m2, depending on the stadium.','A small Tokyo room can be around 7 to 10 m2.','A single hectare is 10,000 m2, roughly a square that is 100 m by 100 m.']},\n\t\t\tvolume:{title:'Volume: containers, pools, and oceans',items:['An Olympic swimming pool holds about 2.5 million litres of water.','A 20-foot shipping container has roughly 33 m3 of internal volume.','A typical bathtub holds about 150 to 250 litres.','Earth oceans contain roughly 1.3 billion km3 of water.','A standard drink can is usually 330 to 355 ml.']},\n\t\t\tmass:{title:'Mass: tiny devices to planets',items:['Earth mass: about 5.97 x 10^24 kg.','Moon mass: about 7.35 x 10^22 kg, roughly 1.2 percent of Earth mass.','Jupiter is about 318 Earth masses.','A small car is often around 1.2 to 1.6 tonnes.','A modern smartphone is usually around 170 to 230 g.']},\n\t\t\tspeed:{title:'Speed: sound, light, and orbital motion',items:['Speed of light: exactly 299,792,458 m\/s in vacuum.','Speed of sound at sea level is roughly 1,235 km\/h, so supersonic means faster than that.','Subsonic means below the speed of sound.','Earth orbits the Sun at about 107,000 km\/h.','Earth rotation at the equator is about 1,670 km\/h.']},\n\t\t\ttime:{title:'Time: clocks at cosmic scale',items:['A light-year is distance, not time: about 9.46 trillion km.','Sunlight takes about 8 minutes 20 seconds to reach Earth.','One day is 86,400 seconds.','A GPS satellite clock has to account for relativity or navigation drifts.','One year in this converter uses 365 days, useful for rough planning rather than astronomy.']},\n\t\t\tpressure:{title:'Pressure: air, tyres, oceans',items:['Sea-level air pressure is about 101.3 kPa, or 1 atmosphere.','Deep ocean pressure increases by roughly 1 atmosphere every 10 m.','Car tyres often sit around 220 to 250 kPa.','Espresso machines usually brew around 9 bar.','At the water triple point, pressure is about 611.657 Pa.']},\n\t\t\tpower:{title:'Power: devices to civilization scale',items:['Phone chargers often range from 5 W to 30 W.','A kettle can pull around 1,800 to 2,400 W.','A home solar system is commonly around 3 to 6 kW.','Large power stations are measured in hundreds or thousands of MW.','Covering huge desert-scale land with solar could theoretically produce world-scale electricity, but storage and transmission are the real engineering problem.']},\n\t\t\tenergy:{title:'Energy: batteries, food, and chemical defence',items:['1 food Calorie is 1 kcal, equal to 4,184 J.','A phone battery is often around 10 to 20 Wh.','A laptop battery is often around 40 to 100 Wh.','1 kWh runs a 1,000 W device for one hour.','Bombardier beetles use a chemical reaction that can eject a near-boiling defensive spray in rapid pulses.']},\n\t\t\tdata:{title:'Data storage: decimal vs binary reality',items:['1 GB equals 1,000 MB in decimal storage.','1 GiB equals 1,024 MiB in binary storage.','A modern phone photo is often around 3 to 10 MB, depending on camera settings.','Apollo Guidance Computer fixed memory was about 72 KB, smaller than many modern web images.','A 4K phone video can use hundreds of MB per minute.']},\n\t\t\tdataRate:{title:'Data rate: internet vs internal storage',items:['100 Mbps internet is about 12.5 MB\/s before overhead.','Gigabit Ethernet is 1 Gbps, roughly 125 MB\/s before overhead.','4K streaming often needs around 25 Mbps.','Fast PCIe 5.0 desktop NVMe drives can read around 14,000 to 15,000 MB\/s.','Wi-Fi 6 real-world speeds are often hundreds of Mbps, not the maximum printed on the box.']},\n\t\t\ttemperature:{title:'Temperature: record extremes and strange states',items:['Hottest official air temperature: 56.7 C at Furnace Creek, Death Valley, USA, on 10 July 1913.','Coldest directly measured air temperature: -89.2 C at Vostok Station, Antarctica, on 21 July 1983.','Water triple point: 0.01 C at about 611.657 Pa, where ice, liquid water, and water vapour can coexist.','Liquid nitrogen boils at about -196 C.','Sodium acetate hot ice crystallises around 54 C, releasing stored heat as it turns solid.']}\n\t\t};\n\t\tfunction unitMemory(){try{return JSON.parse(localStorage.getItem(unitStorageKey)||'{}')||{};}catch(e){return{};}}\n\t\tfunction writeUnitMemory(data){try{localStorage.setItem(unitStorageKey,JSON.stringify(Object.assign(unitMemory(),data)));}catch(e){}}\n\t\tfunction renderUnitFacts(){var pack=unitFacts[unitCategory.value]||unitFacts.length; if(!pack||!unitFactsTitle||!unitFactsList)return; unitFactsTitle.textContent=pack.title; unitFactsList.innerHTML=pack.items.map(function(item){return '<li>'+esc(item)+'<\/li>';}).join('');}\n\t\tfunction fillUnits(){var currentFrom=unitFrom.value, currentTo=unitTo.value, list=unitSets[unitCategory.value]||unitSets.length; unitFrom.innerHTML=list.map(function(item){return '<option value=\"'+esc(item.code)+'\">'+esc(item.label)+' ('+esc(item.code)+')<\/option>';}).join(''); unitTo.innerHTML=unitFrom.innerHTML; unitFrom.value=list.some(function(item){return item.code===currentFrom;})?currentFrom:list[0].code; unitTo.value=list.some(function(item){return item.code===currentTo;})?currentTo:list[Math.min(2,list.length-1)].code;}\n\t\tfunction tempToC(value,unit){if(unit==='F')return(value-32)*5\/9; if(unit==='K')return value-273.15; return value;}\n\t\tfunction cToTemp(value,unit){if(unit==='F')return value*9\/5+32; if(unit==='K')return value+273.15; return value;}\n\t\tfunction formatNumber(value){return Number(value).toLocaleString([], {maximumFractionDigits:8});}\n\t\tfunction convertUnit(){var value=parseFloat(unitAmount.value||'0'), list=unitSets[unitCategory.value]||unitSets.length, fromUnit=list.find(function(item){return item.code===unitFrom.value;}), toUnit=list.find(function(item){return item.code===unitTo.value;}); if(!Number.isFinite(value)){unitResult.textContent='Enter a valid number'; unitDetail.textContent='The amount must be numeric.'; return;} if(!fromUnit||!toUnit){unitResult.textContent='Choose units'; unitDetail.textContent='Select from and to units.'; return;} var result=0; if(unitCategory.value==='temperature'){result=cToTemp(tempToC(value,fromUnit.code),toUnit.code);}else{result=value*fromUnit.factor\/toUnit.factor;} unitResult.textContent=formatNumber(result)+' '+toUnit.code; unitDetail.textContent=formatNumber(value)+' '+fromUnit.code+' = '+formatNumber(result)+' '+toUnit.code; writeUnitMemory({amount:unitAmount.value,category:unitCategory.value,from:unitFrom.value,to:unitTo.value});}\n\t\tvar savedUnit=unitMemory(); if(savedUnit.amount)unitAmount.value=savedUnit.amount; if(savedUnit.category)unitCategory.value=savedUnit.category; fillUnits(); if(savedUnit.from)unitFrom.value=savedUnit.from; if(savedUnit.to)unitTo.value=savedUnit.to; renderUnitFacts(); convertUnit();\n\t\tunitAmount.addEventListener('input',convertUnit);\n\t\tunitCategory.addEventListener('change',function(){fillUnits(); renderUnitFacts(); convertUnit();});\n\t\tunitFrom.addEventListener('change',convertUnit);\n\t\tunitTo.addEventListener('change',convertUnit);\n\t\tunitSwap.addEventListener('click',function(){var old=unitFrom.value; unitFrom.value=unitTo.value; unitTo.value=old; convertUnit();});\n\t}());\n\t<\/script>\n\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-775","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"dgwt-wcas-product-suggestion":false},"uagb_author_info":{"display_name":"","author_link":"https:\/\/silcom.io\/?author=0"},"uagb_comment_info":0,"uagb_excerpt":null,"_links":{"self":[{"href":"https:\/\/silcom.io\/index.php?rest_route=\/wp\/v2\/pages\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/silcom.io\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/silcom.io\/index.php?rest_route=\/wp\/v2\/types\/page"}],"replies":[{"embeddable":true,"href":"https:\/\/silcom.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=775"}],"version-history":[{"count":1,"href":"https:\/\/silcom.io\/index.php?rest_route=\/wp\/v2\/pages\/775\/revisions"}],"predecessor-version":[{"id":777,"href":"https:\/\/silcom.io\/index.php?rest_route=\/wp\/v2\/pages\/775\/revisions\/777"}],"wp:attachment":[{"href":"https:\/\/silcom.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}