For sake of simple example, for a 10k thermistor of beta 3950 with a 10k "other" resistor with the NTC on the low side (connected to Gnd), and a 10 bit ADC, my spreadsheet will poop out the following code (from which I have stripped comments for legibility)...
float convertAnalogToTemperature(unsigned int analogReadValue)
{
// If analogReadValue is 1023, we would otherwise cause a Divide-By-Zero,
// Treat as crazy out-of-range temperature.
if(analogReadValue == 1023) return 1000.0;
return (1/((log(((10000.0 * analogReadValue) / (1023.0 - analogReadValue))/10000.0)/3950.0) + (1 / (273.15 + 25.000)))) - 273.15;
}
float approximateTemperatureFloat(unsigned int analogReadValue)
{
return -0.0917300598433493*analogReadValue+72.3197381920379;
}
int approximateTemperatureInt(unsigned int analogReadValue)
{
return ((((((long)analogReadValue*64) / -698) * 64) + 4628) / 64) - 0;
}