Purpose. In 2019, the Innovative Medicines Initiative funded the ConcePTION project to enhance monitoring of medication safety in pregnancy and breastfeeding. This paper describes how the ConcePTION Pregnancy Algorithm (PA) identified pregnancies in 10 diverse European electronic healthcare data sources and estimated their duration. Methods. Data sources from six European countries were mapped to the ConcePTION Common Data Model. Any pregnancy-related record was retrieved from various available data banks, including birth register, primary care records, and hospital records, and reconciled into episodes of pregnancy (starting between 01/2015 and 12/2019), each with start date, end date, and type of end. A random forest model was used to estimate missing gestational ages for incomplete records. Parameters were tailored to data sources to address local variations in data availability, collection, and governance. Model performance was evaluated using cross-validated Root Mean Squared Error (RMSE). Results. The PA identified ~ 2.7 million pregnancies, in over 2.2 million individuals. Most ended in live births (50%-83%), 1%-15% in elective terminations, and 4%-10% in spontaneous abortions, depending on data sources. Pregnancies with unknown type of end were also retrieved (2%-34%). Gestational age was predicted for 6%-89% of records (RMSE: 17-50 days). The median gestational age at first identified pregnancy record ranged from 47 to 280 days. Conclusions. We developed an open-source algorithm to identify and date pregnancies, including early-stage pregnancies with unknown end and/or ongoing at the time of data extraction. This algorithm may facilitate multinational studies, improving generation of timely real-world evidence about use and safety of medicinal products in pregnancy.