# Can I subtract the values of one curve from another curve?

Using Formula Entry, it is possible to subtract the values of one curve from another curve. This can be done if the curves share the same X values or if they were plotted using two different sets of X values.

If the curves use the same set of X values: You can use Formula Entry to subtract the values of one Y column from another Y column to find the difference between the two. If your Y1 data is in c1, and your Y2 data is in c2, you can use the formula c3=c2-c1 to find the difference and store the results in c3.

If the curves use separate sets of X values: KaleidaGraph provides a table() command in Formula Entry that can be used to perform linear interpolation. Using this command, you can find the Y values of a curve at specific X locations. This would let you find the Y values for one of your curves at the X values used by the other curve.
As an example, suppose you have a data set containing the following: c0 is the X1 data, c1 is the Y1 data, c2 is the X2 data, c3 is the Y2 data

If you run the following command in Formula Entry, c4=table(c0,c2,c3), c4 will contain the values from the Y2 curve at the X1 values. You can then run the formula c5=c4-c1 to find the difference between the two curves.

Scroll to Top