The selective permeability of cellular membranes is a crucial property for controlled transport into and out of cells. Molecules that can bypass the cellular machinery and spontaneously translocate across membranes could be used as therapeutics or drug carriers. Peptides are a prominent class of such molecules, which include natural and man-developed antimicrobial and cell-penetrating peptides. However, the necessary peptide properties for translocation remain elusive. Computer simulations could uncover these properties once we have a good collective variable (CV) that accurately describes the translocation process. Here, we developed a new CV, which includes a description of peptide insertion, local membrane deformation, and peptide internal degrees of freedom related to its charged groups. By comparison of CVs, we demonstrated that all these components are necessary for an accurate description of peptide translocation. Moreover, the advantages and disadvantages of three common methods for free-energy calculations with our CV were evaluated using the MARTINI coarse-grained model: umbrella sampling, umbrella sampling with replica exchange, and metadynamics. The developed CV leads to the reliable and effective calculation of the free energy of peptide translocation, and thus, it could be useful in the design of spontaneously translocating peptides.