The potential for delivering high precision radiotherapy using linear accelerators (linacs) has been improved with the development of digital x-ray electronic portal imaging devices (EPID) for acquiring kilovoltage (kV) cone-beam CT and megavoltage (MV) images for patient positioning. EPIDs have also opened the possibilities of developing novel quality assurance and insight into radiotherapy equipment performance. The aim of this work was to measure the offset of the focal spot position (FSP) of a linac under gantry rotation relative to the collimator axis using an EPID. The focal spot was assumed to be a point source of MV x-ray generation. A special phantom was designed for measurement of FSP as a function of gantry angle on clinical linacs. The phantom was designed for attachment to the gantry head and supporting two tungsten-carbide ball-bearings at two different distances from the focal spot. The methodology was demonstrated on a series of images acquired of the phantom on three Elekta linacs in clinical use with 6 MV flattening-filter-free (FFF) beams. The gantry and collimator were rotated 360° in steps of 30°. For each position an image of the phantom was acquired using the EPID. Each series consisted of 169 EPID images. The images were analysed using in-house developed software. Analyses of the EPID images acquired with 6 MV FFF beams showed that the focal spot motion amplitudes relative to the collimator axis during gantry rotation in the longitudinal and lateral directions were less than 0.10 mm and 0.50 mm, respectively, for an optimized 6 MV FFF FSP calibrated linac. In a treatment planning system (TPS) the focal spot is assumed to be located on the rotation axis of the collimator at all gantry angles. This work introduces a method for quantifying the actual variation from this assumption in practice.