Reading a DC voltage

I have a voltage divider circuit set up to read 1/10 of the actual voltage via 2 resistors when I try to read from the analog input A0, my output looks like nonsense.

Output (via serial monitor):

0.00
5.00
3.34
1.05
5.00
0.50
3.58
4.75
0.00
5.00
3.38

The code is straight forward:

void setup() {
Serial.begin(9600);
}

void loop() {
int sensorValue1 = analogRead(A1);
float voltage1 = sensorValue1*(5.0/1023.0);
Serial.println(voltage1);
}

What is the best way to get a steady reading from a DC voltage?

Are you sure you have DC? Are you sure you're connected to A1?

What is the source of this voltage?

Is the voltage-under-test's ground connected to the Arduino's ground?

Try connecting the Arduino's 5V to A1. And/or, connect the Arduino's 5V to the voltage divider to confirm you are reading 0.5V.

What resistors are you using? The smallest should be less than 10K Ohms.

Do not forget to connect the grounds.

It was the ground issue. I did not have the voltage source connected to the arduino ground. That solves that, thanks.