Theory:

Length:
Length can be defined as the difference between the two points.
For example if you want to measure your body length, you should find the length between your head and your toe in the leg.
Height-measurement.svg
 
Similarly, we use this fundamental quantity to measure the distance also. Usually, we calculate the distance in centimetre or meter. For measuring small distances we can use rulers.
ruler-4113045.png
 
But if the distance to measure is huge we use Kilometer as a unit of measurement.
 
Have ever wondered how we calculate the distance at sea?
 
We use the term call nautical miles to measure the distance at sea.
 
\(1\) mile \(=\) \(1.6\) Kilometers.
 
\(1\) nautical mile \(= 1.852\) Kilometers at sea.
 
Now we know how we calculate the distance at sea, but what about space?
 
To measure the very large and enormous  distance we use the following units.
 
1. Light years.
 
2. Astronomical units
 
3. Parsec
 
Light years:
 A light-year is a distance travelled by light in one year in a vacuum and it is equal to  9.46 ×1015m or 9.46×1013Km.
Know that light travels 3×108m per second.
 
\(1\) Light year:
 
To calculate one light-year, multiply the total number of days in a year, hours in a day, minutes and seconds, and the product of this value should be multiplied by 3×108m.
 
1Lightyear=(365×24×60×60)×(3×108)1Lightyear=31536000×(3×108)1Lightyear=9460800000000000=9.46×1015m
 
2. Astronomical units:
Astronomical units used to calculate the distance between the Sun and the Earth.
 
It is the mean distance of the center of the Sun from the center of the earth.
 
1AU=1.496×1011m
Parsec:
Parsec is the unit of distance, we can use this method to measure astronomical objects outside the solar system.
1Parsec=3.28Lightyears.
Reference:
Image credit :
Measuring height : Free image from, https://freesvg.org/height-measurement
Scale : Image by Kody McDonald from Pixabay ,https://pixabay.com/vectors/ruler-metric-measure-length-4113045/