A method for deterministically minimizing the cost of a single Monte Carlo tally employing weight-dependent weight-window variance reduction has been developed. This method relies on deterministic calculations of the tally's variance and average computational time per history, the product of which is the cost (inverse figure of merit) of the tally calculation. The tally's variance is deterministically computed by solving the history-score moment equations that describe the moments of the tally's score distribution, and the average time per history is computed by solving the future time equation that describes the expected amount of computational time a particle and its progeny require to process to termination. Both equations are solved by the Sn  method. Results are presented for one- and two-dimensional problems that demonstrate increased calculation efficiency, by factors of 1.1 to 2, of the optimized problems over standard adjoint (importance) biasing.