a programming language agnostic definition would be
take 3 sequential points p0, p1, p2, subtract their coordinates and determine their respective angles, then derive the differences
(d1_x, d1_y) = d1 = p0 - p1 yields the differences in the x and y coordinates
(d2_x, d2_y) = d2 = p2 - p1 ditto
ang1 = arctan2(d1_y, d1_x) (d1's y, and x differences)
ang2 =arctan2(d2_y, d2_x)
ang = (ang2 - ang1)
ang_deg = degrees(ang) to convert from radians to degrees if needed
note you need your language's implementation of arctan2 not atan and that most use arctan(dy, dx) unlike spreadsheets which reverse these. This avoids messy uses of arccos and dot products as normally shown in textbook equations