Train numbers allotted to Indian Railway trains

few years back, Indian Railways updated all the train numbers of the country by converting them to 5-digit instead of earlier 4-digit Scheme used.

Example Train: 12014- Amritsar-New Delhi Shatabdi Express

Lets Start by analyzing significance of each of the digit.

First Digit
It indicates the type of passenger train.

0 is for special trains (e.g., summer specials, holiday specials, etc.)

1  is for all long-distance trains, including the Rajdhani, Shatabdi, Sampark Kranti, Garib Rath, Duronto, etc.

2 is also for long-distance trains; it is to be used when train numbers starting with 1 are exhausted in any series.

3 is for Kolkata suburban trains.

4 is for suburban trains in Chennai, New Delhi, Secunderabad, and other metropolitan areas.

5 is for passenger trains with Conventional coaches.

6 is for MEMU trains.

7 is for DMU (DEMU) and railcar services.

8 is currently reserved.

9 is for Mumbai area suburban trains

So our example train is a shatabdi, so the first digit is 1.

Second Digit:

The meaning of second digit depends on what the first digit is.

If the first digit is 0, 1, 2:
In the case of special trains and long-distance express  trains, i.e., trains starting with digits '0', '1', or '2', the  remaining 4 digits signify the railway zone and division exactly as in  the pre-2011 4-digit scheme. In fact, most 5-digit numbers for  long-distance trains  are created simply by  prefixing '1' to the former 4-digit codes. The zonal codes (second digit) are as shown:

0 is for Konkan Railway
1 is for CR, WCR and NCR.
2 is for Superfasts, Shatabdi, Jan Shatabdi, and some other classes of trains  regardless of zones. For these, the next digit is usually the zone code.
3 is shared by ER and ECR
4 is for NR, NCR and NWR
5 is shared by NER and NFR
6 is for SR and SWR
7 is shared by SCR and SWR
8 is for SER and ECoR
9 is for WR, NWR and WCR

Second and Third Digit:

Eastern and East Central Railway
30 is for Howrah
31 is for Sealdah
32 is for Danapur
33 is for Dhanbad
34 is for Malda
35 is for Asansol

Northern, North Central and North Western Railway
40 is for New Delhi
41 is for Allahabad (NCR)
42 is for Lucknow
43 is for Moradabad
44 : other
45 is for Ambala
46 is for Firozpur
47 is for Bikaner(NWR)
48 is for Jodhpur(NWR)

North-Eastern and North-east Frontier Railways
50 is for Lucknow (BG, NER)
51 is for Varanasi (BG, NER)
52 is for Sonepur / Samastipur (BG, NER)
53 is for Izzatnagar / Lucknow (MG, NER)
54 is for Varanasi (MG, NER)
55 is for Samastipur (MG, NER)
56 is for Lumding (BG, NFR)
57 is for Katihar (BG/MG) / Alipurduar (BG) (NFR)
58 is for Lumding / Alipurduar (MG, NFR)
59 is for Tinsukia (NFR)

Southern and South-Western Railways
60 is for Chennai
61 is for Chennai Egmore
62 is for Mysore (SWR)
63 is for Thiruvananthapuram
64 is not in use
65 is for Bangalore (SWR)
66 is for Palghat
67 is for Madurai
68 is for Trichy

South-Central and South-Western Railways
70 is for Secunderabad
71 : other
72 is for Vijayawada
73 is for Hubli (SWR, BG)
74 is for Guntakal (BG)
75 is for Hyderabad
76 is for Kacheguda

South-Eastern, South-East Central and East-Coast Railways
80 is for Kharagpur
81 is for Chakradharpur
82 is for Bilaspur
83 is for Sambalpur and others
84 is for Khurda Road
85 is for Waltair
86 is for Adra

Western, North-Western and West-Central Railways
90 is for Mumbai
91 is for Vadodara
92 is for Bhavnagar (BG)
93 is for Ratlam
94 is for Kota (WCR)
95 : other
96 is for Ajmer (NWR)
97 is for Jaipur (NWR)
98 is for Bhavnagar (MG)
99 is for Rajkot

Train designated as "superfast", Rajdhani Express, Shatabdi Express, or  Jan Shatabdi Express; in this case, the second digit indicates the zonal  railway:

20 is for Shatabdis and Jan Shatabdis on all zonal railways
21 is for superfasts on CR and WCR (formerly only CR)
22 is for superfasts from various zones - NR, NCR, NWR
23 is for superfast on ER and ECR
24 is for superfast on NR, NCR and NWR (formerly only NR)
25 is for superfast on NER and NFR
26 is for superfast on SR and SWR (formerly only SR)
27 is for superfast on SCR and SWR (formerly only SCR)
28 is for superfast on SER, SECR and ECoR (formerly only SER)
29 is for superfast on WR, WCR and NWR (formerly only WR)

 Mumbai suburban trains use the following system. Up and down directions are generally reflected in the use of odd and even numbers, respectively.

90xxx: WR locals originating from Virar
91xxx: WR locals originating from Vasai Road / Bhayander
92xxx: WR locals originating from Borivali
93xxx: WR locals originating from Malad / Goregaon
94xxx: WR locals originating from Andheri / Bandra / Mumbai Central
95xxx: CR fast locals
96xxx: CR locals going north of Kalyan
97xxx: CR locals on the Harbour line
98xxx: CR locals on the trans-Harbour line
99xxx: CR locals going south of Kalyan
Last Two digits:

These are just the serial numbers for a given set of trains.