Depends on which rifle- no one answer. Sorry.
Serial number and features
There were .22 'shorts' and .22 LR (long rifle) models made. Read your barrel to determine which you have.
It's hard to determine the value without knowing who made the rifle and the condition the it is in.
Record the serial number then contact the company. Using the serial number they can tell you the year it was made.
I don't believe Crosman ever made a model 40 rifle. I have no reverence to any model by that number made by Crosman. However they did make a model 140 from 1954 to 1968 in four variations.
Provide a detailed description of ALL markings.
Proofhouse.com has sn tables
Depends on which specific rifle you had in mind. They're usually determine by Minute of Arc (MOA).
This rifle was made in 1962
Define "modern rifle". A semi auto rifle was made for the Mexican Army in 1897- The Mondragon.
By the first two digits of the serial number. AB
By the serial number on the rifle.