Firstly, try to take an objective look at your own situation.
You are being paid X. This means your employer currently receives your services at the cost of X. You feel you are worth X + n and are trying to get paid that amount for your services. To achieve this, you have three options:
- Disregarding any external factors, convince your employer to pay you X + n.
In practice, if you want to arrive at X + n you'll probably need to start the discussion by asking for something higher than X + n and understand that you'll probably end up with less than X + n. While the value 'on the market' of your services may be X + n, they've been paying X for those services, so to them, the value of the services is still X. What other companies might feel your services to be worth is irrelevant to them, they are not the other companies.
- Use external factors as evidence that your services are worth X + n and try to convince your employer to pay it to you.
This means that your employer will inevitably feel threatened. After all, you're saying that someone else would pay you X + n for your services, so even if you don't have an actual offer, you're still implying that all it takes for you to get X + n is to switch to another employer. This means that the employer has a simple choice: either they give you X + n or another employer does.
- Switch jobs to a company that will pay you X + n.
Obviously, the last option is to actually quit and join a new company that will agree to pay you X + n for your services.
So how will these options affect your relationship with your employer?
Excepting very rare cases, no matter how well the discussions go, the first option will leave some part of the company feeling unhappy. To understand why is simple:
Imagine you have a service, for instance your subscription to TV. For amount X you get a specific set of channels. You happily use your subscription for a while but then all of a sudden, you get a letter saying that they would now like you to pay amount X + n for the same set of channels. So, you call them up to ask where this increase in price is coming from. And they answer: "Well sir, the price you're paying was established a long time ago. Since then, we've made improvements to our service so we now feel that it's worth more. Even if you understand their reasoning, you've always been getting the service for X, so to you, that's the value of the service. To you, it doesn't matter that other providers of that service charge X + n, it may even be the reason that you liked this company, you were getting a good deal!
In the second case, your employer will feel like you're threatening them. To continue in the style of the example above, it's as if the TV company is saying "Well sir, this is what people are willing to pay for our service these days." No matter how they put it, this will always feel like they're saying "Either you pay us X + n, or someone else will". It can also feel like a slippery slope to them. Today you're asking for X + n, but what happens when you suddenly decide you're worth more later? In many cases, this option leads the company to start trying to replace you, even if that means they will need to pay more than X for the services.
So this leaves the third option, which is always the easiest one. As long as you're more or less correct about the market value of your services, it should be relatively easy to find someone who's willing to pay that market value. At the very least, it will be a lot easier than to convince your existing employer to pay you more for the same thing. Even if you're happy at the current company with everything except for your salary, this is still ususally the best option unless you're willing to settle for getting paid something between X and X + n (usually substantially below X + n though).