Motivated by the Kazhdan-Lusztig equivalence, which relates modules over affine Lie algebras and modules over quantum groups, we formulate a formula which compares the semi-infinite cohomology with respect to $\mathfrak n((t))$ on the affine Lie algebra side and the cohomology with respect to $U_q(\mathfrak n)$ on the quantum group side. While the original Kazhdan-Lusztig equivalence is only for negative level affine Lie algebras, we will present the formula in both negative and positive level cases. We will also explain how this formula shows up in recent progress in the quantum local geometric Langlands theory, in which the level
becomes the quantum parameter.