Numerator
Numerator[expr] gives the numerator of expr.
Examples
Get numerator of a fraction:
Numerator[3/4]
(* 3 *)From rational expression:
Numerator[(a + b)/(c + d)]
(* a + b *)Please visit the official Wolfram Language Reference for more details.