quote calculation