How do you add temperatures? This will probably be considered very simple, but I am just a beginner:
I'm developing a software application where temperatures need to be added and subtracted. Some temperatures are in Celsius, some in Kelvin. I know how to convert to/from Kelvin (273.15), but how should one go about adding and subtracting these? Should everything be converted to Celsius first?
For example:
0°C + 0°C = 0°C
0°C + 500°C = 500°C

But:
0°C + 273.15K = ?

If we put everything in Kelvin, we get:
273.15K + 273.15K = 546.3K

If we put everything in Celsius, we get:
0°C + 0°C = 0°C

But obviously, 546.3K isn't equals to 0°C.
Now, you might say I can't add temperature to temperatures (but should be adding energy or something? not sure). But the reason I'm doing this is because we need to interpolate. I have a collection of key-value-pairs, like this:
973K  -> 0.0025
1073K -> 0.0042
1173K -> 0.03
1273K -> 0.03

Now I need to get the value for 828°C. So I need to interpolate, which means adding/subtracting values.
I hope I'm making sense.
 A: You need to distinguish between a temperature measurement and a temperature difference.  (Though others may have better terms for these concepts.)  A measurement (in this sense) is tied to some (usually physical) reference, such as the freezing point of water.  A difference may use the same size units as a measurement but there is no reference point.  
If you convert a temperature measurement from C to F you multiply by 1.8 and add 32.  But if you convert a temperature difference from C to F you simply multiply by 1.8.
And adding and subtracting:


*

*measurement - measurement => difference

*measurement + measurement => meaningless

*difference +/- difference => difference

*measurement +/- difference => measurement

*(measurement + measurement)/2 => measurement


Another way to look at it:
Suppose you're talking about locations.  Does it make sense to add the location of Chicago to the location of New York?  Not really.  You might, however, subtract one location from the other and come up with a (vector) distance between them.  Or you can add a (vector) distance to one location to come up with a new location.
Or you can average several locations to come up with a "centrally located" average location.
(There must be a mathematical term for this distinction between measurement and difference or location and distance, but I'm not aware of it.)
A: You may always add the numbers in front of the units, and if the units are the same, one could argue that the addition satisfies the rules of dimensional analysis.
However, it still doesn't imply that it's meaningful to sum the temperatures. In other words, it doesn't mean that these sums of numbers have natural physical interpretations. If one adds them, he should add the absolute temperatures (in kelvins) because in that case, one is basically adding "energies per degree of freedom", and it makes sense to add energies.
Adding numbers in front of "Celsius degrees", i.e. non-absolute temperatures, is physically meaningless, unless one is computing an average of a sort. This is a point that famously drove Richard Feynman up the wall. Read Judging books by their covers and search for "temperature". He was really mad about a textbook that wanted to force children to add numbers by asking them to calculate the "total temperature", a physically meaningless concept.
It only makes sense to add figures with the units of "Celsius degrees" if these quantities are inteprreted as temperature differences, not temperatures. As a unit of temperature different, one Celsius degree is exactly the same thing as one kelvin.
If you interpolate or extrapolate a function of the temperature, $f(T)$, you do it as you would do it for any other function, ignoring the information that the independent variable is the temperature. Results of simplest extrapolation/interpolation techniques won't depend on the units of temperatures you used.
A: Temperature is an intensive property (of a substance), that is, the value of the property does not depend on the amount of substance - for example, if you take a glass of water from a bucket of water, the glass of water will have the same temperature as the bucket of water has. Density is another example of an intensive property of a system. Since intensive propeties cannot be combined (added or subtracted) to obtain a resultant value; temperatures (or densities) cannot be combined to get a resultant temperature (density). This is the reason (intensive quantity) why one cannot add or subtract temperatures.
Extensive properties, such as volume, heat etc., can be combined (added or subtracted) to give a resultant value.
When we mix two samples of water at different temperatures, to get the temperature of the resulting mixture of water, we convert the intensive quantities to the corresponding extensive quantities, which can be added to get the resultant value, from which we can extract the value of the intensive property.
Since delta values of quantities do not depend on the zero of the scale, the delta values can be added to get a new delta value. But, values of quantities can only be added if the zeroes of the scales coincide and the values of unit coincide as well. 
In the case of Celsius and Kelvin tempertures the zeros of the scales don't coincide while the values of unit coincide. In the case of Celsius and Fahrenheit scales neither the zeros of the scales coincide nor the units coincide. Hence, care suld be excercised in dealing with conversions from one to another scale of temperatures.
A: I would recommend you to convert everything in Kelvin and then use the Kelvin values to interpolate between the values. You should use Kelvin for this since it is the only more or less common scale which is relative to the absolute zero and so you will not have to handle negative temperatures - though this seems very unlikely compared to the example values you provided. Additionaly this will prevent any zero-value results where they should not be (like in your example). The other reason for this is that it seems that all the values to interpolate from are given in Kelvin and therefore it is more reasonable to stick to this unit rather than switching to and from different units gratuitously.
But think before adding temperatures. As you see it is normally only reasonable when changes appear. 
You will be better off if you can somehow switch the units for your interpolated value to something else like the total amount of heat energy in the material or the sample.
Adding ice at 0°C to your drink at 20°C will not simply add the temperatures but some of the heat energy stored in your drink will be used to compensate the difference in the temperature between the drink and the ice.
So please check that way first, it might be easier to calculate and it will definitely be a lot easier to understand and therefore be easier to check your results quickly.
A: You can make a square with 2 equal right angled triangles. Therefore, you could say that 2 triangles = 1 square, just like how 273.15K = 0°C. But what happens if you try to calculate 1 square + 2 triangles, do you get 2 squares? No, because even though the 2 triangles resemble the shape of 1 square, they will never BE 1 square (there's a line in the middle, the mass is not equal, you can't move them as a whole unless you glue them together).
So you will have to devise a way to convert triangles to squares and then add them. Just like that, you have to convert °C to K before adding them, if you want to do it right.
A: You simply cannot add temperatures - such a sum is meaningless !
Using Celsius is simply totally wrong in nearly every circumstance as Celsius involves negative numbers
Science states very clearly that the only way to sum up in thermodynamics involves using the Stefan-Boltzmann equation.
Using the examples you show there are no consistent values anyway and any interpolation you make is thus useless.
A: Just convert  everything into kelvins (or Celsius, or Fahrenheit, it doesn't matter as long as you're consistent), then do the interpolation, then convert back if you need to. You will almost certainly find that this does work, and that it does give the same answer no matter which unit system you use.
The reason is that when you do interpolation, you're not adding and subtracting temperatures, you're adding and subtracting temperature differences, and this means that the terms that arise from using a different zero point (such as the 546.3K in your calculation) will always cancel out.
A: You're going to have to tell us why you'd want to do this. I take a stab at it below, where I assume you want to interpolate the temperature between two sensors. 
As Motl pointed out you don't "add" temperatures. It's physically meaningless - and dangerous since there's a fundamental misunderstanding in how the program works. 
However, you can mix materials - say you added cold milk to your hot coffee. In this case you are mixing the phases. A simple way to get the resulting temperature (and good enough for simple mixtures) is to do a weighted average the temperatures where the weights are the heat capacity (that is the specific heat of the material times the mass). However, if there is heat released upon mixing (say, pouring acid into water) this would not work.
Now, let's say you're programing a temperature interpolation routine to get an estimate of the temperature somewhere between two sensors. Within the program it appears that you're adding (or subtracting) temperatures, but really you're averaging them weighted in length (assuming a homogenous material). Here "adding temperatures" only works if the material is the same - the heat capacities cancel out. Otherwise you should solve the Laplace equation. 
A: The following wiki article is about the "level of measurement" or "scale of measure". 
Also a link to the article of  the psychologist S.S Stevens from which originate a popular classification of scales.
Even if it is possible to numerical operation with numbers that are the results of measurements these operations do not always make sense. 
Does adding temparature make sense? The situation is similar to adding time
It does not make sense to add the date $2014/06/14$ to the date $2013/09/23$. You can add each position to get $4027/15/37$ but then you don get a valid date. 
What makes sense is calculation the difference of two dates. The difference 
$$2014/06/14-2013/09/23 = 264 \;\text{days}$$
or
$$2013/09/23-2014/06/14=-264 \;\text{days}$$
If you use an other calendar, which means another starting point  of your time calculation, the differende remains $264$ days. That is similar from changing form Celsius to Kelvin.
Adding a time difference to a point in time makes sense too:
$$2013/09/23 - 264 \;\text{days} = 2014/06/14$$
Note tha difference has an orientation (a sign). So the difference of the date $p_1$ and $p_2$ and the difference between $p_2$ and $p_1$ have different orientation and therefore add up to $0$.
This also works if one change the calendar
Similar consideration can be done for the points of a plane. The points have coordinates. If one changes the coordinate system, the coordinates of the points change. The addition of  points does not make 
sense, the difference of points make sense. But in contrast to the time the difference is not a number but a 2 component vector, like "300 kilometers north west".
similar considerations can be done with the temparature. I used the time example because it is more clear from the notation if we are talking about a  point in time  or about a time difference.
In these examples where the origin is arbitrary chosen :the freeze point of water, the year when the birth of christ was supposed, the intersection of medidian through greenich and the equator.  In the 
nomenclatura of Stevens we are talking about interval scales: the difference has a meaningful interpretation.
The following operations are meaningful when using such a scale:
difference of to  points (measurements)
adding/subtracting a difference to/from  a oint
adding/subtracting a difference from another difference
multiplying a difference by a number (two and a half time the distance between Rome and Paris)
dividing a difference by another (to get a number)
(the arithmetic mean and the product of differences are   special things that I want not dicuss here)
the following does not make sense:
adding two points
multiplying two points, a point by a difference
multiplying a point by a number
...
So back to your temparature question.
10C + 15C does not make sense if both are point on the scale. But if one of them is a scale it makes sense. Then we get 25C. Assume the right one is the difference. THen the physical meaning is something 
like: if the temparature of the object is currently $10C$ and we raise its temparature by $15C$ then its final temparature has $25C$.
So lets assume that the right value is always the difference. Than all of the following makes sense
$$0C + 273.15K = 273.15C$$
$$273.15K + 0C = 273.15K$$
$$0C + 40R = 50C$$
$$40R+0C=40R$$
$$20R+90F=60R$$
$$90F+20R=135F$$
$$20C+0F=20C$$
If you look at the formulas of linear interpolation
$$y=y_0+(y_1-y_0)\frac{x-x_0}{x_1-x_0}$$
or polynomial interpolation
that they contain only operations that where called meaningfull above:
Calculating temparature differences, e.g. $x_1-x_0$, dividing temparature differences bei another temparaure difference to get a number , $\frac{x-x_0}{x_1-x_0}$, multiplying a difference by a number, $(y_1-y_0)\frac{x-x_0}{x_1-x_0}$ to get a difference and adding a difference to a point $y_0$. So $y$ should have interval scale, too. 
The same is true for a polynomial interpolation.
A: I disagree with your statement "I need to interpolate, which means adding/subtracting values."  The reason I disagree, is that there are various methods of interpolation.  The addition/subtraction method is typically used for linear interpolation.  For your case, this method is not accurate because your data is not only not linear, but also, it reaches saturation.
The best method is to get the equation of the "best fit" curve for your data, in the vicinity of the point of interest (826 degr. C), and then just enter into the equation the point of interest and obtain its corresponding pair value. In other words, when the number on the left is entered (degr. C), the number on the right is obtained:
  $$ 700 -> 0.0025$$
  $$ 800 -> 0.0042$$
  $$ 826 -> 0.0054 $$
  $$ 900 -> 0.0300$$
  $$1000 -> 0.0300$$
There are a number of programs that can give you the "best fit" curve for any given set of data.
A: I'm a software engineer, not really a physicist, but I do want to suggest that you don't deal with raw numbers if possible. It's way too easy for someone to assume one number is in the wrong units, and then give you bad results. (Such as bringing down a spacecraft.)
Create a class or something to abstract temperature conversions, so you're always dealing with some Temperature object rather than numbers. Internally it would always store temperatures in Kelvin.
// Constructor methods
static Temperature fromCelsius(double) { ... }
static Temperature fromKelvin(double) { ... }

// Conversion methods
double toCelsius() { ... } 
double toKelvin() { ... }

Then you'd use it like so:
Temperature temp1 = Temperature.fromCelsius(0.0);
Temperature temp2 = Temperature.fromKelvin(273.15);
assert temp1.toKelvin() == temp2.toKelvin();

Except when doing calculations, always prefer to pass around Temperature objects rather than a number. No need to make assumptions about what unit you're dealing in. 
Also, follow the advice of the other answers on this thread. They know physics more than I do.
