The engagement rate formula for X
Engagement rate by views = (likes + replies + reposts + quotes + bookmarks) / views x 100.
Engagement rate by followers = the same engagements / your followers x 100.
X's analytics divides by impressions, which X now shows on every post as views. Dividing by followers answers a different question: how much of your own audience acted on it. A post that travels beyond your followers can pass 100% of them in views and still have a low rate by views.
Why the public number is lower than X's analytics
X's analytics counts every click on a post as an engagement: opening it, tapping your name, a link or a hashtag. Only the author sees those. A rate worked out from the numbers anyone can see leaves them out, so it runs lower. Use one method and stick to it.
What to compare it with
Not someone else's average. Accounts differ in size, niche and what they post, so a "good" rate from a list tells you little. Compare a post with the median of your own recent posts of the same kind: a reply with replies, a thread with threads. A post well above your median shows you what to make more of.