Your starting block will usually be X,Z:0,0. If 0,0 would be underwater, your starting block will be nearby. Your starting Y coordinate will vary depending on the height you spawn at. Sea level is Y:63.
Open the Options menu and select “Chat Settings. " Disable “Reduced Debug Info. “[5] X Research source
For desktop PCs, pressing F3 will open the debug screen. [7] X Research source For many laptops and Mac computers, you’ll need to press Fn+F3. [8] X Research source On newer Mac computers, you’ll need to press Alt+Fn+F3. [9] X Research source
“X” is your location to the east or west of your starting block (longitude). “Y” is your location above or below the starting block (elevation). “Z” is your location to the north or south of your starting block (latitude).
While you typically start at X,Z:0,0 (unless that block is in the water), your starting location’s Y value will typically be around 63, since this is the sea level.
Open the Worlds menu. Tap the pencil next to the name of your world. Toggle the “Activate Cheats” switch to the On (green or blue) position. A pop-up will appear to tell you that achievements will be permanently disabled for this world if you continue. If you’re okay with this—and it is required to enable cheats—tap Continue. Return to the location in your world where you want to view your coordinates.
“X” is your longitude. If X is positive, you’re to the east of your starting block. If X is negative, you’re to the west. “Y” is your elevation. 63 is sea level, and 0 is bedrock. “Z” is your latitude. If Z is positive, you’re south of the starting block. If Z is negative, you’re north of the starting block.