For the purpose of real-time scan-protocol optimisation and patient-specific dose management in cone-beam computed tomography, we introduce a numerical algorithm that estimates the primary dose distributions in reconstructed images. The proposed algorithm is based on the ray-tracing technique and utilises reconstructed voxel data and scanning protocol. The algorithm is validated with the Monte Carlo (MC) and conventional model-based dose reconstruction methods for the simple cylindrical water and anthropomorphic head phantoms. The algorithm shows good agreement with both methods in terms of the zeroth-order x-ray interactions, which exclude the higher-order x-ray interactions at sites distant from the first interactions, and it consumes a significantly lower computational cost compared with the MC method. The differences between the proposed algorithm and the model-based dose reconstruction method as well as the improvement strategies of the algorithm are discussed in detail.