Octane number is a measure on the stability of the fuel. It's based on the pressure at which the fuel will auto-ignite in a test engine. There are different rating testing conditions which reflect on the values for Motor Octane Rating (MOR) and Research Octane Rating (RON)
Sometimes AKI (Anti-Knock Index is specified which is (R+M)/2.
There are 18
isomers of normal octane (C8H18). The Iso-Octane 2,2,4-Trimethylpentane (CH3)3CCH
2CH(CH3)2 is highly stable (very resistant to knocking) and is given a
reference value of 100.
The extremely
unstable normal heptane (C7H16) molecule is the 0 octane reference fuel.
You cannot check these values at home. Real test equipment is extremely expensive. Only the one mentioned by
@Hyaenidae is affordable. It's Russian made and I have seen it somewhere in UAE.
Remember, in the olden days we had leaded fuel.... TetraEthyl Lead was added as an anti-knock. Lead is poisonous and thus got banned everywhere, except for Algeria. It was the the last country that used leaded fuel. They also stopped the practice in July 2021.