We propose relaxing the first-order conditions in optimization to approximate rational consumer choice. We assess the magnitude of departures with a new, axiomatically founded measure that admits multiple interpretations. Standard inequality tests of rationality for any given reference class of preferences can be conveniently repurposed to measure goodness-of-fit with that class. Another advantage of our approach is that it is applicable in any context where the first-order approach is meaningful (e.g., convex budget sets arising from progressive taxation). We apply these ideas to shed new light on existing portfolio-choice data.