Electric Potential Converter
Convert voltage and electric potential units between volts, millivolts, kilovolts, megavolts, and more.
Result
1000 V
All Conversions
Volt (V)1000
Millivolt (mV)1000000
Microvolt (µV)1.000000e+9
Nanovolt (nV)1.000000e+12
Kilovolt (kV)1
Megavolt (MV)0.001
Gigavolt (GV)0.000001
Abvolt (abV)1.000000e+11
Statvolt (statV)3.335640952
Preguntas Frecuentes
Implementación de Código
# Electric Potential (Voltage) Unit Converter
# Base unit: Volt (V)
POTENTIAL_TO_VOLT = {
"V": 1,
"mV": 1e-3,
"µV": 1e-6,
"nV": 1e-9,
"kV": 1e3,
"MV": 1e6,
"GV": 1e9,
"abV": 1e-8, # Abvolt (CGS-EMU)
"statV": 299.792458, # Statvolt (CGS-ESU)
}
def convert_potential(value: float, from_unit: str, to_unit: str) -> float:
"""Convert electric potential (voltage) between units."""
if from_unit not in POTENTIAL_TO_VOLT:
raise ValueError(f"Unknown unit: {from_unit}")
if to_unit not in POTENTIAL_TO_VOLT:
raise ValueError(f"Unknown unit: {to_unit}")
volts = value * POTENTIAL_TO_VOLT[from_unit]
return volts / POTENTIAL_TO_VOLT[to_unit]
# Examples
print(f"1 kV = {convert_potential(1, 'kV', 'V'):.0f} V")
print(f"120 V = {convert_potential(120, 'V', 'mV'):.0f} mV")
print(f"1.5 V = {convert_potential(1.5, 'V', 'µV'):.0f} µV")
print(f"5 V = {convert_potential(5, 'V', 'kV'):.4f} kV")
print(f"1 statV = {convert_potential(1, 'statV', 'V'):.6f} V")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.