How high schools calculate class rank (if they do) is up to the high school.
Note that even if class rank is not published, The Common Application school report asks counselors to check rank ranges for various attributes of the applicant: https://commonapp.my.salesforce.com/sfc/p/d0000000eEna/a/0V000001Avzq/PBXzR0UOtu4hSdgTXHDH9Sk6bTeQ6w8l2NQblq_KoZ0
California public universities do not use class rank as calculated by the high school. There is an ELC rank that is based on UC recalculated GPAs of a recent previous class where being above the GPA of the top 9% gives ELC status for UCs.
For Texas public universities, class rank from the high school is the most important factor.