calculating vertical distance

i want to calculate the distance the player starts at and it current location on the y axis every Update() to count the score. how do i do that?

Save the starting y as a float, then subtract from player.transform.position.y:
private float groundLevel;

public GameObject player;
private float startHeight;
private float currentHeight;

void Start(){
	startHeight = player.transform.position.y;
}

void Update(){
	currentHeight = player.transform.position.y - startHeight;
}

assuming you write in c#