months_between(dt_1, dt_2) calculates the (fractional) number of months between the two dates dt_1 and dt_2. The result is positive, if dt_2 is earlier than dt_1.
The following statement returns 42:
select
months_between(
add_months(sysdate, 42), -- The first parameter denotes a point in time after
sysdate -- the point in time specified with the second parameter:
) -- the result is positive.
from
dual;