On average eggs last about 3 weeks after purchase, but it can still be hard to know just how old your eggs are.
Here’s a test that can answer the freshness question for you. Drop an egg into water. If it sinks to the bottom, it’s fresh, perfect for poaching and soft-boiling. If it stays submerged with its wide end up, it’s older but still good for most uses, especially hard-boiling which cooks the egg all the way though. If it floats, toss it. That’s a bad egg.