There are many options for replacing your key fob: some cheap, some not so cheap. Without more information about your vehicle I can't determine what would be the cheapest option, but have a read of ...
The cost to replace your key fob will depend on how old the vehicle is and where you get it done. An automotive locksmith might be cheaper than a dealer but you'll need the spare. You can read more ...