IMPORTANCE: The incidence of arterial thromboembolism and venous thromboembolism in persons with COVID-19 remains unclear. OBJECTIVE: To measure the 90-day risk of arterial thromboembolism and venous thromboembolism in patients hospitalized with COVID-19 before or during COVID-19 vaccine availability vs patients hospitalized with influenza. DESIGN, SETTING, AND PARTICIPANTS: Retrospective cohort study of 41 443 patients hospitalized with COVID-19 before vaccine availability (April-November 2020), 44 194 patients hospitalized with COVID-19 during vaccine availability (December 2020-May 2021), and 8269 patients hospitalized with influenza (October 2018-April 2019) in the US Food and Drug Administration Sentinel System (data from 2 national health insurers and 4 regional integrated health systems). EXPOSURES: COVID-19 or influenza (identified by hospital diagnosis or nucleic acid test). MAIN OUTCOMES AND MEASURES: Hospital diagnosis of arterial thromboembolism (acute myocardial infarction or ischemic stroke) and venous thromboembolism (deep vein thrombosis or pulmonary embolism) within 90 days. Outcomes were ascertained through July 2019 for patients with influenza and through August 2021 for patients with COVID-19. Propensity scores with fine stratification were developed to account for differences between the influenza and COVID-19 cohorts. Weighted Cox regression was used to estimate the adjusted hazard ratios (HRs) for outcomes during each COVID-19 vaccine availability period vs the influenza period. RESULTS: A total of 85 637 patients with COVID-19 (mean age, 72 [SD, 13.0] years; 50.5% were male) and 8269 with influenza (mean age, 72 [SD, 13.3] years; 45.0% were male) were included. The 90-day absolute risk of arterial thromboembolism was 14.4% (95% CI, 13.6%-15.2%) in patients with influenza vs 15.8% (95% CI, 15.5%-16.2%) in patients with COVID-19 before vaccine availability (risk difference, 1.4% [95% CI, 1.0%-2.3%]) and 16.3% (95% CI, 16.0%-16.6%) in patients with COVID-19 during vaccine availability (risk difference, 1.9% [95% CI, 1.1%-2.7%]). Compared with patients with influenza, the risk of arterial thromboembolism was not significantly higher among patients with COVID-19 before vaccine availability (adjusted HR, 1.04 [95% CI, 0.97-1.11]) or during vaccine availability (adjusted HR, 1.07 [95% CI, 1.00-1.14]). The 90-day absolute risk of venous thromboembolism was 5.3% (95% CI, 4.9%-5.8%) in patients with influenza vs 9.5% (95% CI, 9.2%-9.7%) in patients with COVID-19 before vaccine availability (risk difference, 4.1% [95% CI, 3.6%-4.7%]) and 10.9% (95% CI, 10.6%-11.1%) in patients with COVID-19 during vaccine availability (risk difference, 5.5% [95% CI, 5.0%-6.1%]). Compared with patients with influenza, the risk of venous thromboembolism was significantly higher among patients with COVID-19 before vaccine availability (adjusted HR, 1.60 [95% CI, 1.43-1.79]) and during vaccine availability (adjusted HR, 1.89 [95% CI, 1.68-2.12]). CONCLUSIONS AND RELEVANCE: Based on data from a US public health surveillance system, hospitalization with COVID-19 before and during vaccine availability, vs hospitalization with influenza in 2018-2019, was significantly associated with a higher risk of venous thromboembolism within 90 days, but there was no significant difference in the risk of arterial thromboembolism within 90 days.