Engineering Notation (e.g., 1.2345E3)
Standard Decimal (e.g., 12345)
Understanding Engineering Notation
Engineering notation is a variation of scientific notation where the exponent of 10 is always a multiple of three. This makes it particularly useful in engineering and science disciplines where quantities often fall into standard ranges (e.g., kilo, mega, giga for large numbers; milli, micro, nano for small numbers). Unlike standard scientific notation which aims to have a single non-zero digit before the decimal point (e.g., 1.2345 x 104), engineering notation typically keeps one to three digits before the decimal point (e.g., 12.345 x 103 or 1.2345 x 104, but the exponent must be a multiple of 3, so it would be 12.345E3).
The Math Behind Engineering Notation
The core principle is to express any number N in the form m x 10p, where:
m is a number such that 1 ≤ |m| < 1000
p is an integer that is a multiple of 3 (…, -6, -3, 0, 3, 6, …).
Converting to Engineering Notation:
Take the logarithm base 10 of the absolute value of the number: log10(|N|).
Divide this logarithm by 3 and take the floor to find the largest multiple of 3 that is less than or equal to the logarithm: floor(log10(|N|) / 3). Let this be k.
The exponent for engineering notation is then p = 3 * k.
Calculate the mantissa m by dividing the original number N by 10 raised to the power of p: m = N / (10p).
The result is expressed as m x 10p or mEp.
Example: Convert 123456 to engineering notation.
log10(123456) ≈ 5.0915
floor(5.0915 / 3) = floor(1.697) = 1
k = 1
p = 3 * 1 = 3
m = 123456 / (103) = 123456 / 1000 = 123.456
Result: 123.456E3
Example: Convert 0.0000456 to engineering notation.
To convert a number from engineering notation (mEp) back to a standard decimal, you simply calculate m * 10p.
Example: Convert 45.6E-6 to standard decimal.
m = 45.6, p = -6
45.6 * 10-6 = 45.6 * 0.000001 = 0.0000456
Use Cases in Engineering and Science
Engineering notation is prevalent in:
Electrical Engineering: Voltage (mV, V, kV), Current (µA, mA, A), Resistance (mΩ, Ω, kΩ, MΩ).
Physics: Wavelengths (nm, µm, mm, m), Force (mN, N, kN), Mass (mg, g, kg, Mg).
Computer Science: Data storage (KB, MB, GB, TB).
Chemistry: Concentrations (µM, mM, M).
Its consistent exponent step of three simplifies comparisons and understanding of magnitudes across different measurement scales.
function calculateEngineeringNotation() {
var numberInput = document.getElementById("inputNumber");
var conversionTypeSelect = document.getElementById("conversionType");
var resultDiv = document.getElementById("result");
var numberValue = parseFloat(numberInput.value);
var conversionType = conversionTypeSelect.value;
if (isNaN(numberValue)) {
resultDiv.textContent = "Please enter a valid number.";
resultDiv.style.backgroundColor = "#dc3545"; // Error color
return;
}
var engString = "";
var decimalValue = "";
if (conversionType === "toEng") {
if (numberValue === 0) {
engString = "0E0";
} else {
var sign = numberValue = 1000) {
mantissa /= 1000;
exponent += 3;
}
engString = (sign * mantissa).toPrecision(6) + "E" + exponent;
}
resultDiv.textContent = engString;
resultDiv.style.backgroundColor = "var(–success-green)";
} else if (conversionType === "fromEng") {
var engRegex = /^([+-]?\d+(\.\d+)?)(e|E)([+-]?\d+)$/;
var match = numberValue.toString().match(engRegex); // Treat input as string if it might be in E notation
if (match) {
var mantissa = parseFloat(match[1]);
var exponent = parseInt(match[4]);
decimalValue = mantissa * Math.pow(10, exponent);
resultDiv.textContent = decimalValue;
resultDiv.style.backgroundColor = "var(–success-green)";
} else {
// If input is not in E notation, try to parse it as a standard number
decimalValue = numberValue; // It's already a decimal number
resultDiv.textContent = decimalValue;
resultDiv.style.backgroundColor = "var(–success-green)";
}
}
}
// Add event listener for Enter key press on input field
document.getElementById("inputNumber").addEventListener("keypress", function(event) {
if (event.key === "Enter") {
event.preventDefault(); // Prevent default form submission
calculateEngineeringNotation();
}
});
// Add event listener for Enter key press on select field
document.getElementById("conversionType").addEventListener("keypress", function(event) {
if (event.key === "Enter") {
event.preventDefault(); // Prevent default form submission
calculateEngineeringNotation();
}
});