CSS Specificity Calculator

Calculate the specificity (a, b, c) of CSS selectors and see which rule wins — supports :is(), :not(), :has() and :where().

Runs instantly in your browser — results update as you type.

How is CSS specificity calculated?

Specificity is a score of three numbers (a, b, c): a counts ID selectors, b counts classes, attributes and pseudo-classes, and c counts element types and pseudo-elements. Paste selectors one per line and the calculator scores each and sorts them so you can see which rule wins.

How to use the CSS Specificity Calculator

    Frequently asked questions

    Why is my CSS not applying?

    Another rule probably has higher specificity or comes later. Compare them here.

    How do I lower specificity?

    Use single classes, avoid IDs in CSS and wrap selectors in :where().

    Is it free?

    Yes.