Antenna arrays have gained significant interest in millimetre-wave communication systems as an enabling technology to achieve higher capacity and mitigate the high propagation loss. Such arrays with a large bandwidth need to be efficiently calibrated to maximise their performance. An antenna array calibration method based on a stochastic approximation algorithm and simultaneous perturbation has been developed and the procedures to implement it in both frequency and time domains have been presented. The approaches to define objective functions and establish gradient approximations to fulfill a successful convergence for acquiring calibration coefficients in both domains have been explored. In the time domain implementation, only a fraction of the measurement time was required to calibrate an antenna array of ultrawide bandwidth compared with other methods using a perturbation technique. The effectiveness of the proposed method has been validated via numerical experiments in both domains.