Reasonable answers from the others here.
However: Don't pay more than 3.5% in earnest money. That's not wise.
As already noted, the amount of earnest money is negotiable. On top of that, the customary percentage varies geographically. In some cases, it's more likely to be a set figure, like $2,000. Other times, it's more likely to be a percentage of the purchase price, such as 1%. The whole idea of an earnest money deposit is to show that you're serious, and to put that money at risk if you don't perform according to the agreement. But you ought to be looking at something roughly in those ranges . . . not 4%, 5%, or more.
Talk to YOUR Realtor (not the listing agent) and determine what a reasonable earnest money deposit would be for your area. Then offer that. If the seller wants a lot more (like 4%-5%), ask yourself if you really want all that risk.
Hope that helps.