I know that to, for example, convert from Fahrenheit to Celsius you subtract 32 and then divide by 1.8.
I'm interested in how this type of formula can be developed. So, given two different sets of numbers that are different but describe the same things, how do you construct a formula that will convert any number from one set to the other set?
It's easier for me to understand with something linear, like inches to centimeters, but with sets that don't increase linearly, I'm not sure how to determine an appropriate formula.
The oddity in the Fahrenheit-to-Celsius formula is because the two scales do not have their zero points in the same place; the Celsius zero is at the freezing point of water, but the Fahrenheit zero is at some lower temperature. (There is no simple explanation of why Fahrenheit zero is where it is.)
Say we have two kinds of units, $U$ and $V$, and zero units of $U$ are equal to zero units of $V$. (For example, zero meters equals zero feet.) Then the conversion from $U$ to $V$ is simple; you just multiply by some factor that expresses how much bigger or smaller $U$ is than $V$. (For example, to convert meters to feet you multiply by 3.28, because one meter is 3.28 feet.)
This simple multiplication only works when the two systems have their zero point in the same place: if you have zero meters, you multiply by 3.28 and obtain zero feet. It will not work for Fahrenheit and Celsius, because zero degrees Fahrenheit is not the same temperature as zero degrees Celsius.
First note that between the freezing and boiling points of water is 100 degrees Celsius ($100{}^\circ C - 0{}^\circ C$) but 180 degrees Fahrenheit ($212{}^\circ F - 32{}^\circ F$). This shows that a difference of 180 Fahrenheit degrees is equal to a difference of 100 Celsius degrees. If the two scales had their zeroes in the same place, we could simply multiply Celsius temperatures by $\frac{180}{100}$ to obtain Fahrenheit temperatures.
This is the correct conversion when converting temperature changes. If the temperature today is 10 Celsius degrees higher than it was yesterday, then it is $10\cdot \frac{180}{100} = 18$ Fahrenheit degrees higher. A change of zero degrees Celsius is equal to a change of zero degrees Fahrenheit.
But for absolute temperatures, we need the zero points to be in the same place. Suppose we convert $10{}^\circ C$ to Fahrenheit. This represents ten Celsius degrees above the Celsius zero point, which is the freezing point of water. We multiply by $\frac{180}{100}$ and find that this is $18$ Fahrenheit degrees above the freezing. But freezing in the Fahrenheit scale is $32^\circ$, not zero, and $18$ degrees above freezing is $18+32 = 50$, so $50$ is the answer; we effectively used the formula $$F = C\cdot\frac{180}{100} + 32\tag F$$ where the multiplication by $\frac{180}{100}$ is because there are $180$ Fahrenheit degrees in $100$ Celsius degrees, and the $+ 32$ is because the Celsius zero point is at $32{}^\circ F$.
Similarly, $50^\circ$ Fahrenheit is fifty degrees above the peculiar Fahrenheit zero point, which I will call $Z$. We can convert this to Celsius by dividing by $\frac{180}{100}$, and find that this is $27.77$ Celsius above $Z$. But $Z$ in the Celsius scale is $-17.77$, because when the Fahrenheit thermometer shows zero, the Celsius thermometer shows $-17.77$. Then we want $27.77$ degrees above this, so $-17.77 + 27.77 = 10$, so $50{}^\circ F$ is the same temperature as $10{}^\circ C$, as we said before.
$-17.77$ is a pain to work with, so we rewrite the equation $$C = \frac{100}{180} F -17.77 $$
in the equivalent form $$C = \frac{100}{180}(F-32 )\tag C$$ which involves only whole numbers. This is just what you get if you take equation $F$ and solve it for $C$—as of course it must be.
Exercise: The Rankine temperature scale has degrees that are the same size as Fahrenheit degrees, but its zero point is at absolute zero, which is $-459.67^\circ F$ or $-273.15^\circ C$. What are the formulas for converting Rankine temperatures to Fahrenheit or Celsius and back again?