problems with arduino nano coding

I’m doing the voltage indicator but the input voltage is not same as the output voltage shows on lcd display. Can anyone help me to solve this problem?

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 6, A0, A1, A2, A3);

int analogPin = A4;
float vout = 0.0;
float vin = 0.0;
float R1 = 100000.0; // resistance of R1 (100K)
float R2 = 10000.0; // resistance of R2 (10K)
int value = 0;
int a[5] = {};

int greenLed = 10;
int blueLed = 11;
int yellowLed = 12;
int redLed = 13;
int sound = 8; 

void setup() 
{
  pinMode(greenLed, OUTPUT);
  pinMode(blueLed, OUTPUT);
  pinMode(yellowLed,OUTPUT);
  pinMode(redLed,OUTPUT);
  
  pinMode(A0,OUTPUT);
  pinMode(A1,OUTPUT);
  pinMode(A2,OUTPUT);
  pinMode(A3,OUTPUT);
  
  pinMode(A4,INPUT);
  
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.setCursor(1, 0);
  lcd.print("VOLT INDICATOR");
  lcd.setCursor(6, 1);
  lcd.print("BLIS");
  delay(3000);
  lcd.clear(); 
}

void loop() 
{
 // LCD DISPLAY
  
 lcd.print("Voltage Level"); 
 // read the value at analog input
 value = analogRead(A4);
 vout = (value * 5) / 1024.0;
 vin = vout / (R2 / (R1 + R2));
 Serial.println (vin);
  
 if (vin < 0.09)
 {
  vin = 0.0;
 }
 
 lcd.setCursor(0, 1);
 lcd.print("Voltage V :");
 lcd.print(vin);
 delay(3000);
 //lcd.clear();
 
// LED & BUZZER
  
if(vin <= 11.3)
{
 digitalWrite(redLed, HIGH);
 //delay (1000);
 tone(sound, 1000, 250);              
 delay(1000);                              
 digitalWrite(redLed, LOW);
 //delay (1000);
 tone(sound, 2000, 250);             
 delay(1000);                                
}
  
  if(vin <= 11.60 && vin > 11.3) 
{
 digitalWrite(greenLed,LOW);
 digitalWrite(blueLed,LOW);
 digitalWrite(yellowLed,HIGH);
 digitalWrite(redLed,HIGH);
}
  
  if(vin <= 12.1 && vin > 11.6) 
{
  digitalWrite(greenLed,LOW);
  digitalWrite(blueLed,HIGH);
  digitalWrite(yellowLed,HIGH);
  digitalWrite(redLed,HIGH);
}

if(vin > 12.1) 
{
  digitalWrite(greenLed,HIGH);
  digitalWrite(blueLed,HIGH);
  digitalWrite(yellowLed,HIGH);
  digitalWrite(redLed,HIGH);
}
}

And you know this how?

Paul

This line assumes that the ADC reference voltage is exactly 5V.

 vout = (value * 5) / 1024.0;

Is that the case?

Same for the resistors
float R1 = 100000.0; // resistance of R1 (100K)
float R2 = 10000.0; // resistance of R2 (10K)

Are they +/- 0% resistors?