I would advise you to store a and b separately. You can always use a CDEF in your rrdtool function to generate a new value c=a-b and then average or max this, if you so choose. Steve Steve Shipway University of Auckland ITS UNIX Systems Design Lead s.shipway at auckland.ac.nz Ph: +64 9 373 7599 ext 86487