It depends, and a website should not give you a single gauge to buy. A “40-amp EV charger circuit” usually means a 40-amp breaker protecting a circuit that carries 32 amps of continuous charging (32 × 1.25 = 40). The conductors have to be sized for that circuit under the electrical code your town has adopted, using the temperature rating of the terminals and insulation, the material (copper or aluminum), any required adjustments for heat or bundling, and a voltage-drop check on a long garage or driveway run. Those inputs are not the same in every house, so this site will not say “always use such-and-such AWG.”
You will hear rule-of-thumb gauges in forums. Treat them as hearsay, not as a specification. A longer run can need a larger conductor to limit voltage drop even when a short run would have been acceptable. Aluminum, if used, is a different size than copper for the same ampacity. The breaker, the EVSE terminals, and the conductor insulation may not all be rated for the same temperature column, and the strictest applicable limit is the one that matters.
What you can decide before the electrician arrives: the continuous current you want, whether the service has room for it (use the panel calculator), and the approximate length of the run. The licensed electrician selects the conductor, the raceway, and the fittings, and the inspector checks the result. This page is a limitations explainer, not a materials list.
This is not a permit calculation, a utility approval, or a substitute for a licensed electrician, HVAC contractor, or the authority having jurisdiction. Panel Headroom is an independent educational site. It is not a utility, a certification body, or a contractor. Electrical and generator work that is done incorrectly can cause fire, shock, or carbon monoxide poisoning. Use the adopted electrical code and manufacturer instructions; pull permits where required.