How much 40,000 miles are worth depends on the airline or credit card you earn them from and when you book your flight. On average, 40,000 miles are worth about $400. But it can vary widely. For example, 40,000 AAdvantage miles are worth roughly $456 in American Airlines airfare. With United, 40k miles get you $416 in flights. And 40k Delta miles are worth $532.
Here's how much 40,000 miles are worth by airline:
Lufthansa: $916
Southwest: $616
JetBlue: $572
Delta: $532
American: $456
United: $416
Credit card miles that aren't tied to a particular airline typically get you a penny each. But how you redeem your miles is really important, too. For example, the Capital One Venture Card's 50,000-mile initial bonus is worth $500 when used for travel but just $250 when redeemed for cash.