rsj calculations