Your option to get free support that is best would be to take it to the Genius Bar where they have some fairly fancy battery diagnostics. Any Apple Authorized Service center has access to similar tools from Apple.
As a consumer, you could check the System Information (System Profiler on older OS) and review Power details under Hardware:
Charge Information:
Charge Remaining (mAh): 6638
Fully Charged: Yes
Charging: No
Full Charge Capacity (mAh): 6693
Health Information:
Cycle Count: 54
Condition: Normal
The above details are from a new MacBook Pro with an internal battery. It's in great shape. The below details are from a 14 month old MacBook Air where the battery is not going to make it to it's design life. I'll have to pay for the replacement since at the 1 year point when the warranty was in force, it was still "within spec"
Charge Information:
Charge Remaining (mAh): 1957
Fully Charged: No
Charging: No
Full Charge Capacity (mAh): 4357
Health Information:
Cycle Count: 119
Condition: Normal
You might be able to tell if it's just a battery by inspecting your condition, cycle count and FCC - but these data are much more valuable when you have it logged every month of the Mac's life or can compare your values to thousands of other data points (which is presumably part of what Apple does in its diagnostics).