Temperature Converter
Convert between Celsius, Fahrenheit, and Kelvin.
Common Temperatures
Temperature Converter converts values between Celsius, Fahrenheit, and Kelvin — the three temperature scales you are most likely to encounter in daily life and scientific work. Celsius is the standard in most countries and in science, Fahrenheit is used in the United States for weather and everyday temperatures, and Kelvin is the absolute scale used in physics and chemistry where 0 K represents absolute zero.
Enter a temperature in any of the three fields and the other two update instantly with the converted values. The formulas used are exact: °C to °F is (°C × 9/5) + 32, and °C to K is °C + 273.15. The tool handles both positive and negative temperatures correctly, including values below absolute zero which return an informational warning.
Temperature conversions are needed when reading international weather forecasts, following scientific papers, cooking with foreign recipes, setting laboratory equipment, or understanding historical or geographic climate data.
Frequently Asked Questions
Code Implementation
# Temperature conversion functions
def celsius_to_fahrenheit(c: float) -> float:
return c * 9 / 5 + 32
def fahrenheit_to_celsius(f: float) -> float:
return (f - 32) * 5 / 9
def celsius_to_kelvin(c: float) -> float:
return c + 273.15
def kelvin_to_celsius(k: float) -> float:
return k - 273.15
def fahrenheit_to_kelvin(f: float) -> float:
return (f - 32) * 5 / 9 + 273.15
def kelvin_to_fahrenheit(k: float) -> float:
return (k - 273.15) * 9 / 5 + 32
# Examples
print(celsius_to_fahrenheit(100)) # 212.0 (boiling point)
print(celsius_to_fahrenheit(0)) # 32.0 (freezing point)
print(celsius_to_kelvin(0)) # 273.15 (absolute zero at -273.15°C)
print(fahrenheit_to_celsius(98.6)) # 37.0 (body temperature)Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.