how do I know the amount of double taxed income?

I work in NYC but live in NJ, how can I calculate the double taxed amount? Thanks!