Testamentary capacity refers to a person's legal ability to make or alter a valid will. This capacity requires that the individual understand the nature of their actions, know the extent of their property, and comprehend who will benefit from their decisions. It's a crucial element in ensuring that a person's wishes regarding the distribution of their estate after death are honored, as lack of testamentary capacity can lead to challenges against a will's validity.