Atmega328 without Arduino has different LCD prints compared to Atmega328 with Ar

I have a temperature sensor that outputs a certain voltage to the Arduino. I then convert it to analog by using the equation given in the datasheet to output the correct temperature to an LCD screen. When I have my Arduino hooked up, it outputs the exact temperature it is supposed to. When I take the Atmega328 and use it alone from the Arduino, it outputs about 8 degrees off. The temperature sensor itself is still outputting the correct voltage as it's supposed to! But the print is off. I'm using a 5V input to the Atmega328.

I'm using this schematic to use with my Atmega328. Is there anything else I need with this schematic that might affect the analog inputs?

Thank you very much in advance.

I’m using a 5V input to the Atmega328.

What was the analogue reference voltage on the unnamed Arduino?

How is this an installation issue?

I didn’t use the AREF because when I tried, it got a little messy. I might not know how to use it. How do I use the AREF?

I also apologize, I haven’t used the forum before and I thought it fit into installation using the Atmega. I will fix it next time.

Also Although possibly outside my area of expertise, it sounds like your power supply is not giving 5V.

It turns out it was the AREF pin. I wasn’t aware how to use it, but you just input your analog reference directly into the pin. I wasn’t using it at all so my numbers were thrown off. Thanks your your help!