It could be useful to know what model of printer you are using. It would be useful to know what firmware you are using.
The origin is established in the firmware, if you are working with a printer you built yourself or constructed from a kit and had to flash the firmware.
There is a related post to this forum which covers changing the origin by 10 mm, but the information contained within is useful for your reference.
Effectively, you will want to ensure that the settings in the firmware match your specific printer configuration. The information I've been able to collect suggest that your max x and y position be placed in the firmware.
Not knowing your printer makes a certain answer more difficult. If your endstops are at the maximum travel limits, the above answer is valid. If your endstops are at the origin, there is something else amiss.
Please consider to edit your question to include endstop location and printer model number. Firmware and controller information is also useful.