  We introduce a novel algorithm that leverages stochastic sampling techniques
to compute the perturbative triples correction in the coupled-cluster (CC)
framework. By combining elements of randomness and determinism, our algorithm
achieves a favorable balance between accuracy and computational cost. The main
advantage of this algorithm is that it allows for the calculation to be stopped
at any time, providing an unbiased estimate, with a statistical error that goes
to zero as the exact calculation is approached. We provide evidence that our
semi-stochastic algorithm achieves substantial computational savings compared
to traditional deterministic methods. Specifically, we demonstrate that a
precision of 0.5 millihartree can be attained with only 10\% of the
computational effort required by the full calculation. This work opens up new
avenues for efficient and accurate computations, enabling investigations of
complex molecular systems that were previously computationally prohibitive.
