With a speed test you measure the bottleneck link between you and the speed test's test server. That is you measure the bandwidth of the link with the lowest capacity.
The definition of Internet speed
A more precise definition is mentioned in the paper Understanding broadband speed measurements (PDF) of the Massachusetts Institute of Technology, published August 2010. Based on this paper the definition of speed is:
Internet speed is the amount of data that can be transferred on a network -with one or more congestion-aware transport connections- to a destination server.
This speed is less than the theoretical bandwidth of the weakest link because with this definition packet headers and data packets that are retransmitted are not counted toward the byte counts.
The weakest link
What the weakest link is depends on the internet subscription you have, the last mile and the capacity of your home network.
Certainly with modern 1 Gbps internet subscriptions, your home network will often be the weakest link.
The drawing below shows schematically what more realistic bandwidth-ratios are between the various links of the internet network.
The three tiers
Tier 2 networks / Internet Service Providers peer with some networks without fees but pay for the internet transit to reach the whole Internet.
Tier 3 Internet Service Providers are the smallest Internet Service Providers. They always pay internet transit fees to obtain access to the larger networks.
Your Wi-Fi network is probably the weakest link
The capacity of your network depends, among other things, on the routers used, the location of the WiFi access points, the equipment you use at home (or office) and possible sources of interference.
The bandwidth available to you also depends on the number of concurrent network users and their activities on the Internet.
With you use Wi-Fi you should be aware of the Wi-Fi standard you use. At Wikipedia there is a table with the Wi-Fi generations and their maximum linkrate in Mbps.
- 802.11g (2003) - 6 to 54 Mbps
- 802.11n (2008) - 72 to 600 Mbps
- 802.11ac (2014) - 433 to 6933 Mbps
Obviously, using older devices (an older Wi-Fi standard) means you have limited bandwidth.
When you read the article Measuring Internet Speed: Current Challenges and Future Recommendations it is clear that Wi-Fi is the bottelneck.
Many past experiments demonstrate that the user's Wi-Fi -not the ISP- is often the network performance bottleneck. Sundaresan et al. found that whenever downstream throughput exceeded 25Mbps, the user's home wireless network was almost always the bottleneck. Although the study is from 2013, and both access link speeds and wireless network speeds have since increased, the general trend of home wireless bottlenecks is still prevalent.
So it's safe to say that when you use a speed test, more often than not you're measuring the speed of your home network.
It follows that in most cases the bandwidth provided by the ISP is not measurable because the home network is the weakest link.