Effort-based decisions, in which people weigh potential future rewards against effort costs required to achieve those rewards, have largely been studied separately for cognitive or physical effort, yet most real-world actions incur both effort costs. What is the relationship between cognitive and physical effort costs? Here we attempt to formalize the mechanisms underlying effort-based decisions and address methodological challenges to isolate and measure these mechanisms. Patch foraging is an ecologically valid reward rate maximization problem with well-developed theoretical tools to understand choices. We developed the Effort Foraging Task, which embedded cognitive or physical effort into a patch foraging sequential decision task, to isolate and quantify the cost of both cognitive and physical effort using a computational model. Participants chose between harvesting a depleting patch, or traveling to a new patch that was costly in time and effort. Participants' exit thresholds (reflecting the reward they expected to receive by harvesting when they chose to travel to a new patch) were sensitive to cognitive and physical effort demands, allowing us to quantify the perceived effort cost in monetary terms. Individual differences in cognitive and physical effort costs were positively correlated, suggesting that these are perceived and processed in common terms across different domains. We found patterns of correlation of both cognitive and physical effort costs with self-reported anxiety, cognitive function, behavioral activation, and self-efficacy. This suggests the task captures decision mechanisms associated with real-world motivation and can be used to study individual variation in effort-based decisions across domains of cost.