Circle of Willis (CoW) is the most critical collateral pathway that supports the redistribution of blood supply in the brain. The variation of CoW is closely correlated with cerebral hemodynamic and cerebral vessel-related diseases. But what is responsible for CoW variation remains unclear. Moreover, the visual evaluation for CoW variation is highly time-consuming. In the present study, based on the computer tomography angiography (CTA) dataset from 255 patients, the correlation between the CoW variations with age, gender, and cerebral or cervical artery stenosis was investigated. A multitask convolutional neural network (CNN) was used to segment cerebral arteries automatically. The results showed the prevalence of variation of the anterior communicating artery (Aco) was higher in the normal senior group than in the normal young group and in females than in males. The changes in the prevalence of variations of individual segments were not demonstrated in the population with stenosis of the afferent and efferent arteries, so the critical factors for variation are related to genetic or physiological factors rather than pathological lesions. Using the multitask CNN model, complete cerebral and cervical arteries could be segmented and reconstructed in 120 seconds, and an average Dice coefficient of 78.2% was achieved. The segmentation accuracy for precommunicating part of anterior cerebral artery and posterior cerebral artery, the posterior communicating arteries, and Aco in CoW was 100%, 99.2%, 94%, and 69%, respectively. Artificial intelligence (AI) can be considered as an adjunct tool for detecting the CoW, particularly related to reducing workload and improving the accuracy of the visual evaluation. The study will serve as a basis for the following research to determine an individual's risk of stroke with the aid of AI.