# Convert between Celsius and Fahrenheit in JavaScript

JavaScript, Math · Sep 14, 2023

In order to convert from Celsius to Fahrenheit, you can use the conversion formula `F = 1.8 * C + 32`.

```const celsiusToFahrenheit = degrees => 1.8 * degrees + 32;

celsiusToFahrenheit(33); // 91.4```

Conversely, the conversion formula from Fahrenheit to Celsius is `C = (F - 32) * 5 / 9`.

```const fahrenheitToCelsius = degrees => (degrees - 32) * 5 / 9;

fahrenheitToCelsius(32); // 0```

## More like this

• ### JavaScript Unit Conversions

Learn how to convert between different units of measurement in JavaScript.

Collection · 4 snippets

• ### Convert between degrees and radians in JavaScript

JavaScript, Math · Sep 15, 2023

• ### Convert between miles and kilometers in JavaScript

Easily apply the mile to kilometer and kilometer to mile formulas.

JavaScript, Math · Sep 13, 2023

• ### Create a unit converter data structure in JavaScript

Learn how to create a unit converter data structure in JavaScript that can convert between any compatible units.

JavaScript, Math · Nov 8, 2023