Depending if appraisal, survey, title and or other items have been ordered and received you will have to pay for those items as well as any mortgage application items. Also in your contract there is a default clause that describes the most injurious part of backing out of the contract. You need to read that. It will say somthing like the sellers can sue you for specific performance. Consult with an attorney.
It means that the seller would exercise his right to have you fulfill your obligation and if not, they would be rewarded 3 times the cost of damages brought upon his suit. It happens but not often. Be careful.
Best thing is to be open and get with your realtor or seller and communicate with them why you want out. That way you might be able to get some of your earnest monay back. Good luck