As you already know, Android has been updated consistently. Each new version of Android brought some new and enhanced features, in addition to bug fixes (and new bugs as well).
In recent years, Google has been tried to release one major update each year.
For example, Android Nougat (Android 7.0/7.1) in 2016, Android Marshmallow (Android 6.0) in 2015, and Android Lollipop (Android 5.0/5.1) in 2014, Android KitKat (Android 4.4) in 2013.
But for Android phones or tablets, most vendors only update the Android version for less than 2 years since the release of the product. And normally, only flagship (=expensive) models get such update. Please check this post on why some Android devices never receive any update.
Therefore the majority of the Android phones and tablets in use are running old (not latest) versions of Android. For example, as shown in the chart below, by October 2016,
You may want to know the version of Android in your device so that you can check whether you have some special features of certain versions of Android.
You can always check the version of Android in your phone or tablet in Settings —About phone (or Settings–About device) as shown below.
In Nexus and Google Pixel phones, the Android version is indicated below about phone as shown below. Other Android vendors seldom show the version of Android here.
Anyway, tap About phone as shown below, you will find the version of Android and other software info including:
As explained in this guide, you can tap build number 7 times to unhide developer options in settings.
Please note, different Android vendors may choose different ways to show Android version and other software info.
For example, as shown above, on Samsung devices (since Marshmallow update), the version of Android is not shown in About device screen as shown above.
Instead, you have to tap Software info after tapping About device as shown above.
In Software info page, you can find similar software info: Android version, build number and security patch level, as shown in the screenshot above..
Since August 2015, Google has released monthly security patch. The date when a patch is published will be called as security patch level.
Some security issues may only affect specific versions of Android. But the security patch level, up to now, is not directly related to Android versions. In other words, most patches can (and should) be applied to several versions of Android.
For example, you may have a device running Lollipop with October 1, 2016 security patch level, and another device running Marshmallow with April 1, 2016 security patch level.
In this case, the vendor of the first device did not update the version of Android, but issued the security patch for it. This should be considered as a responsible vendor.
The vendor of the second device did not do a good job. They should issue new security patches if the device is still under maintenance.
Anyway, most Android vendors may stop maintaining the device after 12-18 months. In this case, you will not get the new version of Android and new security patches any more.
The security patch level usually tells you how responsive an Android vendor is (when the device is still under maintenance).
As mentioned above, build number is always shown together with Android version. It indicates the version of base Android source code.
For Nexus devices, the build number incorporates:
Other Android vendors may or may not follow this convention.
For example, as shown above, Samsung devices have two build numbers. The first one follows the convention mentioned above. MMB29K indicates it is based on Android Marshmallow source code at October 29, 2015. The second one is for Samsung internal use.
If you have any questions on checking version of Android in your phone or tablet, please let us know in the comment box below.
For questions on Android Nougat (Android 7.0 and 7.1), please check Android Nougat guides page.
For questions on Android Marshmallow (Android 6.0), please check Android Marshmallow guide page.
For question on Android Lollipop (Android 5.0 and 5.1), please check Android Lollipop guide page.
For other Android questions or problems, please check Android 101 page.