Find port number SQL Server

–Run this command to display the port number which SQL Server is listening on.
select local_tcp_port
from sys.dm_exec_connections
where session_id = @@SPID
go