Cost-benefit analysis in evolution refers to the evaluation of trade-offs between the costs and benefits of certain traits or behaviors that affect an organism's fitness and survival. This analysis helps explain why certain traits evolve, persist, or disappear, based on their impact on reproductive success and resource allocation.