There are several factors that determine speed when above about 300Mbps. I chased the same issue for days and found the bigest issue is if the test site is using IPv4 or IPv6. I found my router can only acheive about 350Mbps using IPv6, but can get 950Mbps using IPv4. The older Xfinity speed test had an option to set which IP version to use, but defaulted to IPv6. I have since switched to DSLreports speed test which allows selection of several test settings in the advanced section. To get the full 1Gbps I would use IPv4 and search for a very fast router. Most consumer routers will not achieve 1G using IPv6. I just bought a commercial router but I haven't put it online yet as runs Linux and uses command line syntax for settings. This class of router usually does not include WiFi so you will need a WiFi router as well. As stated above, everything must be wired with good ethernet cables.
UPDATE:
I see the new Xfinity speed test now allows selection of test server and IP version. Another thing I found was if your computer is attached to your network through switche(s), the economical swithes will slow your speed as well. I plugged my computer directly into my modem to get full spped when I upgraded to 1G. I bought a managed, full duplex 16 port switch to replace my cascaded $15 5 port switches. Now everything is home run directly to the 16 port switch. This also made a huge different during my 1G testing.
... View more