In this paper, we obtain the crosscap number of any alternating knots by using our recently-introduced diagrammatic knot invariant (Theorem 1). The proof is given by properties of chord diagrams (Kindred proved Theorem 1 independently via other techniques). For non-alternating knots, we give Theorem 2 that generalizes Theorem 1. We also improve known formulas to obtain upper bounds of the crosscap number of knots (alternating or non-alternating) (Theorem 3). As a corollary, this paper connects crosscap numbers and our invariant with other knot invariants such as the Jones polynomial, twist number, crossing number, and hyperbolic volume (Corollaries 1–7). In Appendix Appendix A, using Theorem 1, we complete giving the crosscap numbers of the alternating knots with up to 11 crossings including those of the previously unknown values for [Formula: see text] knots (Tables A.1).