If you keep it in an air-tight glass or ceramic container without much headspace (unused space in the container) it will last for at least 2 weeks without flavor loss.
If you use a plastic container, the coffee can pick up flavors from it (and leave flavor behind).
The more air the coffee is exposed to, the faster it will oxidize.
You can also put the coffee into an ice-cube tray and freeze. After they are solid, use them or place in a freezer-thickness ziploc bag for longer storage. They can last months that way, assuming no exposure to extra air or freeze/thaw cycles.